Get WebRTC going fast

A question that comes up more and more these days: what's the quickest way to try WebRTC and see it working? How can a web developer start experimenting with WebRTC in their blog or demo site?

Good news: it's no longer necessary to compile anything from source - and many of the components are available on Debian-based systems (including Ubuntu) or RPM-based solutions like Fedora

A quick look at how easy it is, explanation below:


# apt-get update
# apt-get install -t experimental repro resiprocate-turn-server
# apt-get install -t unstable chromium sipml5-web-phone
# cd /var/www && mkdir jssip && cd jssip
# wget -r -nH http://tryit.jssip.net
# vi /etc/repro/repro.config
# vi /etc/reTurnServer.config
# vi /var/www/jssip/js/custom.REMOVE_THIS.js

and then try browsing to /jssip or /sipml5-web-phone

Start with a SIP proxy

As explained in the RTC Quick Start guide for regular RTC, a SIP proxy is a clean and simple component to start with. The same is true for WebRTC: start with a proxy. There are two I'll emphasize here:

  • repro from reSIProcate is quick and easy to set up and has built in TLS support. A 1.9 alpha release with WebSocket support for WebRTC has just been uploaded to Debian experimental and is ready to use on wheezy. RPM users just need to download the alpha release tarball and use rpmbuild to get packages from it.
  • Kamailio provides very good WebRTC support too. The packages are available but due to GPL license issues must be recompiled with TLS, see the README.Debian file for details. Also feel free to try the upstream package repository for binaries that do include TLS

Get a TURN server

TURN servers help media streams traverse NAT. They are very easy to set up, but must have real IP addresses.

Put the JavaScript in the web server

Adding WebRTC to a web site can be as simple as cutting and pasting some JavaScript code into the HTML.

Three working samples to start with:

Browser

Users need a recent browser.

The latest Chromium packages in Debian are based on Google Chrome M26 code and this should work.

Help and support

Please come and ask on the users mailing lists or IRC channels for any of the packages mentioned here.