Comments (15)
What version of edge did you test against? It works well for me.
from jsqrscanner.
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.
here, edge is Microsoft Edge 40.15063.674.0
and Microsoft EdgeHTML 15.15063
from jsqrscanner.
we have same version
from jsqrscanner.
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.
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.
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.
"Invalid URI. Load of media resource failed."
the activation of camera fails on firefox and edge, despite accepting the permission request
from jsqrscanner.
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.
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.
I would modify your code also but your code is all encoded in a way that is very hard to change
from jsqrscanner.
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.
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.
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.
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)
- iOS - Works in Browser but Does Not Work From Home Screen HOT 3
- Can't figure out how to use .removeFrom HOT 3
- Example page silently fails when served via unsecured connection (http) HOT 4
- Feature request: Code 128 and others HOT 12
- Does not seem to read QR-codes generated by https://www.qr-code-generator.com HOT 1
- QR Scaner Web
- It doesn't read a .club domain :( HOT 1
- how to use?
- Front facing camera HOT 1
- switch for flashlight
- Problem remembering selection HOT 1
- iOS - safari - front camera
- QR scanner?
- IE 11
- Scanner Doesnt Work On Chrome HOT 5
- Could not start video source on Samsung Note 10+ HOT 4
- [Violation] Avoid using document.write(). Warning HOT 3
- How to set css ?
- Scan with camera id
- License not applied correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsqrscanner.