Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera option #36

Open
apo000 opened this issue Apr 11, 2016 · 2 comments
Open

Camera option #36

apo000 opened this issue Apr 11, 2016 · 2 comments

Comments

@apo000
Copy link

apo000 commented Apr 11, 2016

How can i use the Camera option?
When i press "Capture" nothing is happening (this happens also in the demo http://cirocosta.github.io/qcode-decoder/)

Thank you.

@dola
Copy link

dola commented Apr 18, 2016

The problem here is that qcode-decoder uses a deprecated browser API. I get the following console error when trying to run the example:

getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

The library most likely still works when browsing with an encrypted connection (https).

Navigator.getUserMedia() has been deprecated for all browsers as seen on MDN.

Also on Firefox, qcode-decoder still uses the (even older) deprecated navigator.mozGetUserMedia which has since been replaced with navigator.mediaDevices.getUserMedia. This should be updated in
https://github.com/cirocosta/qcode-decoder/blob/master/src/qcode-decoder.js#L38

@litbea
Copy link

litbea commented Jul 25, 2016

I've tried setting up HTTPS and the problem persists. Using Firefox mobile the selection of camera happens BEFORE loading the full page, so the browser manages to tell qcode-decoder what camera to use. Instead, using Chrome mobile, where the browser doesn't ask what camera you would like to use, the switch doesn't work.

I've tried looking into the code to set the VideoFacingModeEnum property to "environment" as stated in https://w3c.github.io/mediacapture-main/getusermedia.html#dom-videofacingmodeenum-environment but couldn't make it work.

:-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants