質問

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

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top