Lately, I've been working on a demo that utilizes getUserMedia() in Javascript to access the webcam of devices and display the video stream on an HTML5 canvas. In cases where browsers do not support getUserMedia(), I have implemented a fallback to a Flash version of the demo.
Everything functions smoothly in Chrome and Opera, but there's a slight hiccup with Firefox 18. The issue lies in the default setting of media.navigator.enabled being set to false in the config file for Firefox. This essentially prevents the user from enabling the camera, leading to a standstill in my script as it waits for permission that never arrives.
Unfortunately, I cannot alter or override this preference in the config file, nor would I want to. Is there any way to retrieve the value of this flag so that I can implement a pre-check before proceeding, possibly using a condition like "if(media.navigator.enabled)..."?
If no solution is found, I may have to resort to always utilizing Flash for Firefox, which would be somewhat disappointing.
You can check out the demo here.