Giter VIP home page Giter VIP logo

Comments (15)

jbialobr avatar jbialobr commented on June 6, 2024

What version of edge did you test against? It works well for me.
gitext

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

It also fails on firefox by the way, just tested, let me check edge version for you, but I have latest windows 10 with updates installed,

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

here, edge is Microsoft Edge 40.15063.674.0
and Microsoft EdgeHTML 15.15063

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

we have same version

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

executing https://jsqrscanner.appspot.com/ on my edge, same version, shows no errors on console, but the camera just wont activate,it asks for permission, i give permission and it just wont activate

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

exact same problem on firefox, both on firefox and edge, app asks for permission to use camera, I accept and then nothing happens, camera doesnt activate

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

on firefox, the console will show
"Invalid URI. Load of media resource failed."
I wonder if the webrtc code is outdated or something

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

"Invalid URI. Load of media resource failed."
the activation of camera fails on firefox and edge, despite accepting the permission request

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

I have some ideas, I tested the demo here
https://blog.niap3d.com/fr/4,10,news-76-jsQRScan-scanner-un-code-QR-en-Javascript.html
and it has same problem, and in firefox gives the error:
"navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia , Error mediaDevices : NotReadableError: Failed to allocate videosource"

I think both your code and that one may have the same issue, getusermedia code needs to be updated because part of it became deprecated recently and that's why on firefox and edge both are failing to show the camera (android works well)

mediadevices should be the way now for all browsers, using the previous getusermedia route is causing it to fail on firefox and edge

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

yep this is confirmed
I changed the code and now it works, the code has to be changed to use only mediaDevices, then it will work in all browsers

` try {
navigator.mediaDevices.getUserMedia(constraints).then(function success(stream) {
qrStream = stream;
qrVideo.srcObject = stream;
qrVideo.play();
});
}

catch(err) {console.log("Error mediaDevices : " + err);
} `

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

I would modify your code also but your code is all encoded in a way that is very hard to change

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

if its working for you on edge then it means you have different code in the mediadevices area, maybe you could update the code here in the repository? thanks a lot :)

from jsqrscanner.

jbialobr avatar jbialobr commented on June 6, 2024

It uses mediaDevices if defined:
https://github.com/jbialobr/gwt-qrscanner/blob/b0495dab8457cd551ff81bf9bcb8be1cd3bdffd3/core/src/main/java/com/google/zxing/web/ScannerWidget.java#L178
You can submit your patch there.

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

hey, thank you for the reply,
what do you mean by " if defined" ? if defined where and how?

what I can confirm is that it fails on iOS (just tested), firefox and edge because of mediaDevices issues

and you are right, the mediadevices code is there, not sure why it's not being used

thank you

from jsqrscanner.

javismiles avatar javismiles commented on June 6, 2024

in any case in the meantime i modified the code of
https://blog.niap3d.com/fr/24,10,news-76-jsQRScan-scanner-un-code-QR-en-Javascript.html
which is very easy to change, and now it works on iOS, i just made mediaDevices a straight path
`var constraints = {
audio: false,
video: {
facingMode: "environment"
}
};

try {
navigator.mediaDevices.getUserMedia(constraints).then(function success(stream) {
qrStream = stream;
qrVideo.srcObject = stream;
qrVideo.play();
});
}`

from jsqrscanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.