serratus/quaggaJS

Error: enumerateDevices is not defined in not secure connection

Opened this issue · 2 comments

I think while adding below code will help to solve issue .. can u update quaggaJS with below code ?

"permissions": {
"audio-capture": {
"description": "Required to capture audio using getUserMedia()"
},
"video-capture": {
"description": "Required to capture video using getUserMedia()"
}
}

getUserMedia() will never work over HTTP (except at localhost) because of a decision made by browser vendors:
https://blog.mozilla.org/webrtc/camera-microphone-require-https-in-firefox-68/
https://stackoverflow.com/a/34198101/6672199

The way that browsers handle this is by pretending as if they do not support WebRTC by setting enumerateDevices and getUserMedia to undefined.

iOS seems to handle it that way, Chrome handles it by throwing an exception.

Manukk seems to be asking for something specifically relating to Android permissions, which are also necessary at some point, probably when packaged as an application.

Unfortunately, he doesn't seem to be telling us anywhere near enough information to help. If you want something added to the code, a pull request works better than an issue.