Nov 032013
 

I’ve been playing around with SimpleWebRTC.js and the very interesting-looking Talky website, which allows anyone to create a video chat room on-the-fly by entering it in a form or putting the name of the room at the end of the URL. I also looked at the SimpleWebRTC demo, because it seems to be a simpler version of Talky that I could use to get started. Apparently, something like this is extremely easy to implement, and can be set up in as little as 5 minutes. Sadly, it seems they were exagerating just a bit when they said it could be set up in 5 minutes.

SimpleWebRTC.js

According to the website, SimpleWebRTC.js is a very simple modular library that allows developers to get a very basic WebRTC application up and running quickly and easily. There is some very basic documentation on the front page of the site that shows just how easy it can be, and a link to fork it on GitHub. All good so far. So I figured it would be fun to put a copy on my vps and play with it there. But the HTML and JavaScript on the page for some reason didn’t work for me. No problem, I decided that just for testing purposes, I would rip the source from the demo page. After all, it works there, so it should work on my VPS with minimal modifications. No such luck. Every time I enter anything into the form that is presented on the page, it just loops back to the same page with the same form, unlike the demo, which reloads the page, attaches the room name entered from the form to the end of the URL and appears to start the WebRTC chat room.

SignalMaster

The SimpleWebRTC.js website does mention that if I’m planning to do anything other than development or testing, I need to set up my own signaling server. It recommends using a very small JavaScript library called SignalMaster. Fine, at this point, I’m thinking that my problems are caused by the fact that my copy of simplewebrtc.js is still configured to use the development signaling server that is provided for demo/testing purposes only, so I decided to try SignalMaster. And now I find an entirely new problem. I have read just about all there is to read about SignalMaster, which only has a GitHub page and a couple of very short blog posts around the internet, none of which tell me how I’m supposed to get this thing running as a server listening on a port. I did see something that mentioned that I may need node.js, but there were no instructions on how to get the server up and running. In the SignalMaster source tree, there are only 2 json files, a server.js file and the README.md file that shows up on GitHub, which contains very little other than a very short explanation of what it does.

Conclusion

I like the idea, and I like the fact that it’s open source, but it took less time to write this rather extensive blog post than it took to find out that there was no way I was going to be able to make SimpleWebRTC.js work on my server. So I guess since it took me several hours of messing with this thing only to find that something that is said to be usable within 5 minutes doesn’t work at all no matter what I try, and since there is too little documentation on how to make the signaling server run, I will have to table this project for now, and hope that the situation will improve with time.

FacebookTwitterGoogle+DiasporaWordPressLiveJournalBlogger PostTumblrShare it!

  8 Responses to “SimpleWebRTC.js: Maybe Not So Simple”

  1. Hi kyle, nice article.

    Yes, I thought the same about the not-so-simplewebrtc, there is a lack of documentation about how to setup a working simplewebrtc/signalmaster server.

    I hope you could tell us how did you configure simplewebrtc for your vps.

    thanks.

    • Unfortunately, I was unable to configure SimpleWebRTC for my VPS. I may revisit it at a later time, but there just wasn’t enough documentation at this time to get anything working. I still have the example up, but it only loops back to the form that is supposed to create a room.

  2. Very good point. Maybe I should try EasyRTC instead of SimpleWebRTC.
  3. Hi Kyle,

    actually, it is pretty easy to set up, but I can understand you have issues when you’re not familiar with node.js.

    1) You have to install node.js. Then go to the signalmaster directory and run npm install (which is the way to go with all node.js projects so it automatically pulls all dependencies)

    2) Start the server via ‘node server.js’ (the way to run stuff in node.js)

    3) There you go – You have your custom signalmaster server running at localhost:8888, so now you can point your app to it

    4) Find the code where you create a new SimpleWebRTC instance and add a simple line to the config:

    “url: ‘http://localhost:8888/’,”

    You can find this in the github code right on the page you used, and is really basic stuff once you read up on node.js.

    I’m in no way affiliated with this project or WebRTC and just started using it yesterday, and I set up the page in about 5 minutes, it is indeed really easy once you grasp the concept of node.js.

    • Thanks very much for this information. My lack of familiarity with node.js is exactly what caused my trouble with SimpleWebRTC.js and the signaling server. I’ll certainly try installing it again soon.

  4. it took me 2 min to setup the demo… simply copied the html and js, and fired up a simpleHttpServer with python. and it worked. But I do agree with you, there’s virtually no documentation.
    • I really do need to revisit this at some time. WebRTC is definitely promising technology, and I’d love to set something up on my own server. I think my issue was just my lack of familiarity with Node.JS, which is probably easier than it looked the first time I tried to mess with it.

  5. Hi Kyle

    Have you manage to put your signalmaster server live using NodeJS?

    In case you did not manage to do it here is how I did it after hours of fail attempts:

    http://code.tutsplus.com/tutorials/going-live-with-node–net-33923

    I used Apache. To install the needed Apache Modules check this tutorial:

    https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension

    Have a nice day,
    Adrian

 Leave a Reply

(required)

(required)