Here’s a quick update from Drum on some of the issues we’ve had porting WebRTC from Chrome to Firefox Aurora.
Up until now we have concentrated our WebRTC efforts on the Chrome browser from Google. This is primarily because it was the first to support WebRTC and is, if you avoid Canary, a stable product.
But, we are keen to investigate the Opus codec and see how that behaves with Drum. Despite it being mandated as a requirement for WebRTC Opus has not yet been added to Chrome. However, Mozilla has recently added Opus support to the nightly build of Firefox – Aurora. Since we’ll have to support multiple browsers at some point it makes sense to start now!!
- The API calls (eg. GetUserMedia) have different prefixes. In Chrome they are webkitGetUserMedia while in Firefox it is called mozGetUserMedia. The arguments to the methods are identical in each browser. A lightweight shim surrounding these functions quickly sorts this one out.
- When initiating an audio-only connection a browser re-start was required before a subsequent attempt could be made. This issue had already been raised as Bug 773646.
- The PeerConnection method calls that are marked as TODO (eg. onconnecting and onopen) in the WebRTC spec are not implemented in Firefox Aurora. In Chrome these have some code behind them. Simply ignoring them if they weren’t defined seemed to work OK!
At this point I had the signalling up and running. Now I’ve just got to figure out why the media isn’t working. It’s probably down to the STUN negotiation (it normally is!).
I hope that my observations are useful to others attempting a similar project. Please feel free to add comments or questions and I’ll answer as best I can.
Dr Richard Screene is a Senior WebRTC Developer at Drum. Richard has over 20 years experience of development for communication protocols. He is currently responsible for integrating the Drum web and audio conferencing products using WebRTC.