Question

I really need my addon can access the notebook camera if it does exists.

Was it helpful?

Solution

In order to access the webcam in Firefox (and more generally in supporting browsers), you should use navigator.getUserMedia

Prompts the user for permission to use a media device such as a camera or microphone. If the user provides permission, the successCallback is invoked on the calling application with a LocalMediaStream object as its argument.

Here is a tutorial on MDN about taking webcam photos.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top