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 does not seems to work anymore with Firefox #80

Open
heyfellows opened this issue Mar 4, 2018 · 4 comments
Open

Camera does not seems to work anymore with Firefox #80

heyfellows opened this issue Mar 4, 2018 · 4 comments

Comments

@heyfellows
Copy link

Hi,

It seems the last version Firefox 58.0.2 (64 bits) is unable to display the video stream in the outdiv.
I can't see specific errors in console, except few CSP issues.
No problem with Chrome.

Regards.

@gxurma
Copy link

gxurma commented Mar 8, 2018

Same problem for me.
It grabs camera, but no video visible.
Also no results shown.
FF: 58.0.2 (64 bites)

@SvilenStoianov
Copy link

And same issue here. Firefox version 59.0.2 (64-bit)

@SvilenStoianov
Copy link

I've notice that online demo here
https://webqr.com/
work fine with FF. Then i download main js from here
https://webqr.com/webqr.js
and put it in my project and now everything work. Need to insert my custom callback again - so if you have some customization in this file you need to do it again or maybe compare will be better option.

@anferneemnc
Copy link

In fact, in newest version of Firefox (called Quantum), it uses mediaDevices.getUserMedia instead of mozGetUserMedia.
The mozGetUserMedia method doesn't exist anymore.

So here, the simplest solution is, changing the line 135 of jsqrcode/src/qrcode.js by using these codes

if (typeof v.mozSrcObject === "undefined") {
    //for firefox Quantum
    n.mediaDevices.getUserMedia({video: options, audio: false}).then(success).catch(error);
} else {
    n.mozGetUserMedia({video: options, audio: false}, success, error);
}

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

4 participants