WebRTC efforts underway at Mozilla!

Last week, a small team from Mozilla attended IETF 83 in Paris, and we showed an early demo of a simple video call between two BrowserID-authenticated parties in a special build of Firefox with WebRTC support. It is still very early days for WebRTC integration in Firefox, but we’re really excited to show you something that works!

At Mozilla Labs, we’ve been experimenting with integrating social features in the browser, and it seemed like a cool idea to combine this with WebRTC to establish a video call between two users who are signed in using BrowserID (now called Persona). The SocialAPI add-on, once installed, provides a sidebar where web content from the social service provider is rendered. In our demo social service, we show a “buddy list” of people who are currently signed in using Persona.

The video chat page that is served when the user initiates a video chat uses a custom API intended to simulate the getUserMedia and PeerConnection APIs currently being standardized at the W3C. A <canvas> is used to render both the remote and local videos, though it is also possible to render them in a <video>. We’re working very quickly to implement the standard APIs, and you can follow our progress on the tracker bug.

A lot of folks burned the midnight oil to get this demo ready before the IETF event, and special thanks are due to Eric Rescorla, Michael Hanson, Suhas Nandakumar, Enda Mannion, Ethan Hugg, the folks behind Spacegoo, and Randell Jesup, in addition to the whole media team here at Mozilla.

Current development is being done on a branch of mozilla-central called alder. It is going to be an exciting few months ahead as we work towards bringing WebRTC to Firefox. There is a lot of work to do, and if you are interested in contributing, please reach out! Maire Reavy, our product person and project lead for WebRTC would be happy to help you find ways to contribute. Many of us are also usually available in IRC at #media, and we have a mailing list.

Transcript of screencast:

Hi, I’m Anant from Mozilla Labs and I’m here at IETF where we are demonstrating a simple video call between two BrowserID-authenticated parties, using the new WebRTC APIs that we are working on.

This is a special build of Firefox with WebRTC support, and also has the experimental SocialAPI add-on from Mozilla Labs installed. On the right hand side you can see web content served by demosocialservice.org, to which I will sign with BrowserID. Once I’m signed in, I can see all my online friends on the sidebar. I see my friend Enda is currently online, and so I’m going to click the video chat button to initiate a call.

Here, I see a very early prototype of a video call window served up by our demo social service. Now, I can click the Start Call button to let Enda know that I want to speak with him. Once he accepts the call, a video stream is established between the two parties as you can see. So, that was a video call built entirely using JavaScript and HTML!

You can check out the source code for this demo, as well as learn how to contribute to the ongoing WebRTC efforts at Mozilla in this blog post. Thanks for watching!

About Anant Narayanan

@anantn is a hacker at Mozilla Labs who specializes in generalism. He has previously worked on Weave, Jetpack, Account Manager, and Rainbow among other projects. He is currently fiddling with Open Web Apps and Real-time communication for the Web.

More articles by Anant Narayanan…


16 comments

  1. Tod Robbins

    Exciting stuff! What is the roadmap for WebRTC-enabled Nightly/Aurora builds?

    April 3rd, 2012 at 09:55

    1. Anant Narayanan

      We have a goal to get basic WebRTC support in Nightly by the end of this quarter. It might just be support for getUserMedia and not the full PeerConnection, but we will move as fast as we can!

      https://wiki.mozilla.org/Platform/2012-Q2-Goals#Video

      April 3rd, 2012 at 10:09

      1. Forrest O.

        Nice. Will the PeerConnection stuff work for any kind of data?

        April 10th, 2012 at 03:07

        1. Anant Narayanan

          Yes, the data API currently being discussed at the W3C will support both binary & text, as well as unreliable and reliable datagram support.

          April 14th, 2012 at 16:05

  2. Caspy7

    I wonder, might this integrate well with Apache Wave?

    April 5th, 2012 at 10:20

  3. CCAC (Collaborative for Communication Access via Captioning)

    Integrate real time speech to text of high quality and you get the prize! :-)
    cheers, ls/ccac

    April 9th, 2012 at 00:04

  4. Stephan

    Great work is the connection between the two browsers P2P?

    Thanks

    April 9th, 2012 at 07:40

    1. Anant Narayanan

      Yes, the default is to establish a P2P connection but if one could not be created (because of Firewalls etc.) the webapp has an option to use a proxy.

      April 9th, 2012 at 10:11

  5. Andrew Ducker

    This is fantastic. I do wonder whether it would be possible to break this out into it’s own application, but using the Mozilla runtime.

    I like my IM app to be able to open its own windows, pop things up by itself, etc. without necessarily interrupting my browsing. If it’s all running inside a Firefox window then that’s going to be tricky to manage.

    April 9th, 2012 at 10:09

    1. Anant Narayanan

      It sounds like you’d want to make your IM app a full “webapp” using the apps infrastructure we’re working on. https://developer.mozilla.org/en/Apps has an overview on how to do that, once you have a manifest and a user installs your app it will run in its own window, and you will be able to send out notifications, open pop ups etc.

      April 9th, 2012 at 10:16

  6. gt2rs

    Hey, so if it is P2P, over public IP’s there should be no need of 3rd party server, right? I wonder because Ericsson first released their webrtc in ubuntu, and it required webserver as a middle man atleast to initiate the call, subsequently chrome came up with webrtc and that too requires a server setup to manage the peer connection and it’s initialization.

    Now i wonder what is the status with this mozilla’s test app, because considering a scenario where both parties are directly accessable, there really should not be a need for a 3rd party server, i would be interested to know the status with mozilla’s solution?

    April 14th, 2012 at 15:41

    1. Yaniv

      You need a way of transferring the sdp to the other side, so you must have some kind of a web socket that both users are connected to.

      June 5th, 2012 at 01:25

  7. Debbra

    When do you expect WEB RTC be ready for deployment with Firefox? Can you please provide me with an expected date?
    Thank you

    May 15th, 2012 at 09:12

  8. Sam Dutton

    Great stuff. How is the video stream communicated in this prototype?

    July 12th, 2012 at 07:06

  9. majid khosravi

    Great, do you think there is a chance that something similar comes as a standard for HTML 5?

    Also is video peet to peer in this sample or does it require a server to run?

    August 17th, 2012 at 15:55

  10. Pravesh

    Sounds great that we would be able to use WEB RTC, but if it is using HTML5 then would help a lot…

    August 18th, 2012 at 03:28

Comments are closed for this article.