Tip: Enabling Webcam and Microphone in Firefox 18 or 19

After spending nearly an hour trying to figure out why my webcam code wasn’t working in Firefox 19, I realized that the feature is supported but currently turned off by default in the config according to this post.

To enable it, go to about:config and set the media.navigator.enabled property to true:

Supposedly it will be enabled in Firefox 20 and beyond based on a bugzilla thread I read, but in the current state in Firefox 18 and 19, getUserMedia exists and shows up as a valid prefixed API: mozGetUserMedia. If the setting isn’t enabled in the config, your code just fails. The error handler in getUserMedia doesn’t get called at all, so you are just left with an app that doesn’t work yet doesn’t throw an error either.

That is hugely frustrating, but hopefully if you stumble upon this post when running on a Firefox version less than 20, this helps a bit :slight_smile:

Cheers,
Kirupa :megaman_x: