Tag Archives: Firefox 16

Firefox 16 Now Supports HTML5 getUserMedia

Firefox 16 now supports HTML5 getUserMedia. It enables access to webcam without any plugins.

There is an entry in about:config, set that to true. In case you need to add a new entry then:

  • open about:config
  • Right click any entry.
  • Select ‘New‘ >> ‘Boolean

Add the following entry and set it true:


Remember to define callback methods right within the getUserMedia() method as shown below:

function successCallback(stream) {
// Replace source of video element with stream from camera
if(navigator.getUserMedia==navigator.mozGetUserMedia) {
video.src = stream;
} else {
video.src = window.URL.createObjectURL(stream) || stream;

function errorCallback(error) {
console.error(‘An error occurred: [CODE ‘ + error.code + ‘]’);

It won’t works in-case you defined it elsewhere. No need to use CreateObjectURL to pass the stream the video element. Pass the stream directly. video.src=stream

Paul Rouget of Mozilla, created a video tutorial demonstrating HTML5 getUserMedia: