Support for the getUserMedia API has landed in Firefox Nightly

Jul 14, 2012 11:41 GMT  ·  By

Firefox has just gotten support for getUserMedia, i.e. the ability to use webcams and microphones. With this addition, three major browsers now support the API which is the cornerstone of the upcoming WebRTC technology which would enable real-time communications, audio and video, in the browser.

GetUserMedia is now available in the Firefox Nightly builds, so it's still going to be a few months until the feature is made available to a wider audience. Likewise, Google Chrome dev just got support for the feature this week, but it will take some three months until it reaches the stable channel.

As you can expect, support for getUserMedia, what will be the "Media Capture and Streams" standard once ratified by the W3C, is in the early stages in Firefox. Not all of the features of the API have been implemented. What's more, Mozilla has made some additions to the API as well.

"We’ve implemented a prefixed version of the 'Media Capture and Streams' standard being developed at the W3C. Not all portions of the specification have been implemented yet; most notably, we do not support the Constraints API," Mozilla explained.

Mozilla's modifications to the default specs are the addition of a picture API to the existing video and audio API. The idea is to make it possible to snap a single frame, a picture, from the webcam, instead of having to set up a full video feed and then extract a frame from that.

This could be useful for "photo booth" type apps, of which there are plenty already. In fact, most apps that make use of the getUserMedia API so far are this type of apps. And that will stay true until browsers start adding support for the full WebRTC suite.

Mozilla will gauge the popularity of the picture API and then decide whether it will pursue it further and try to add it to the standard specifications. You can check out the feature in this demo page.

You'll need the latest Firefox Nightly builds and you'll need to enable the feature first by creating the "media.navigator.enabled" pref in about:config and then setting it to "true". This is needed since Firefox doesn't have any permission model or UI to handle webcam requests, so it can't come with the feature enabled by default and accessible to any website.