-
Notifications
You must be signed in to change notification settings - Fork 6
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
HTML5 QR Code scanning with javascript - launched v1.0.1 | Minhaz’s Blog #3
Comments
with android mobile browser not found any camera, work only from pc windows, but if i open your demo its also work from mobile. please help me |
@mirkoprog - I'd recommend creating an issue at mebjas/html5-qrcode/issues with more details on browser, OS - where it works, where it not works, if you have error logs add that too and if there are screenshots that would be helpful too. Happy to look into it. |
I have the exact same problem but anyway, all your links on the top page points to a 404 :) Apr 4, 2020 • html javascript jquery qrcode camera promise Demo works, trying to integrate it, when no syntax errors in the console, I get "Unable to query any cameras. Reason: unable to query supported devices." but the same browser, same session, if I open the demo, it works |
Can you point which links don't work? I will fix them.
Can you point me to how you are using it, maybe I can spot the issue. |
i have open a issue: |
(1)
|
@mirkoprog - let's take this further on the issue you created. (2) Fixed it, thanks for pointing. (3) I see, it's related to Also, I just noticed cloning the demo page is one way to try it, but IMO the demo code is very embarrassing, and I'll try to improve it asap. |
hi, thanks for the completed QR code scanner. I tried just refer to the minified version, but could not load the back camera of phone. however, if I refer the both JS on your demo site, is working like charm. Perhaps you are missing something in the minified version? |
@keanwalker - Can you check your console logs to see if there are some errors? I just tested using the minified js on the master branch and it seemed to work fine for me. Are you using a specific version of the package? |
Hey, yes i got it from master branch. It returns "Error getting userMedia, error = NotReadableError: Could not start video source". and I force to set the cameras[i] to 1 to get the back camera. but using your js codes below, is working fine. https://blog.minhazav.dev/assets/research/html5qrcode/qrcode.js |
@keanwalker I merged the pull request today only, so master was little behind while I had already deployed the changes with fix to demo page. If you are no longer able having the issue in the demo page it's kind of a good sign that the issues/38 might have got fixed as well with the PR#42. Would you mind adding a comment in issues/38 if you are no longer finding the issue either in the demo code or the
|
hi mebjas, yes working now. thanks. i will add comment in issues/38. |
Hi, thanks for your work. Is-it possible to scan a barcode ? |
Hi! |
For this you can call the const html5QrCode = new Html5Qrcode(/* element id */ "reader");
html5QrCode.start(
cameraId,
{
fps: 10, // Optional frame per seconds for qr code scanning
// <-- no qrbox set
},
qrCodeMessage => {
// do something when code is read
},
errorMessage => {
// parse error, ignore it.
})
.catch(err => {
// Start failed, handle it.
}); For the second part - please file a feature request at https://github.com/mebjas/html5-qrcode/issues I'll try to take it up from there - at the moment this functionality doesn't exist. |
I had to rename "devices" variable to "cameras" to make it works. "devices" is undefined (using your mini JS version). |
Hi again, thanks for your prompt reply on my previous question. Amazing reponse time!
|
…PS: In my question 1 in previous comment: A visible canvas. |
…aaand another PS to my question 1: When i QR Code is recognized I want to continue the «live feed» in the video window, but render a «still» image in the canvas. |
@cfcoderatcodefactory Could you share more on what is the final goal? As for visible canvas - as of now the tech works like this There is a It'd always be created with Hope this helps. I dont understand the second question though. |
@breizhim could you share where the mistake is or send a pull request to fix that? |
@mebjas I had to rename "devices" variable by "cameras" in your example:
The devices variable was "undefined". By replace it to cameras it works. BUT, I have another problem : the camera is working, I have the white field of scan in the middle, BUT it won't trigger when I show him a QR Code... (I still using your example). I have no JS error... the script can't find patterns. |
@breizhim The name of variable doesn't matter as far as you use the same variable inside the lambda, like function listcamera() {
Html5Qrcode.getCameras().then(randomName => {
if (randomName && randomName.length) {
var cameraId = randomName[0].id; As for the QR code not scanning maybe you can share some video or provide description of the environment - like OS, device, browser etc |
Hi Minhaz, thanks for sharing this! |
@antheroo That's a great point - I think the library should abstract |
|
@mebjas
Well, for the detection issue, i past my code:
--> The video works, but there is not detection nor JS error. I use Firefox 76.0.1, Win10. BTW, thank you for your work ;) |
@mebjas Precision : I checked the javascript console. It stuck at "QR Code no longer in front of camera.". |
fixed this example, thanks for pointing this out! Your code example looks correct, one thing to try would be - once the code is running, open debugger, inspect element and go to |
I have integrated your code in my website. its working fine. |
@nadjalla / @juanpablo64 Please file a feature request, I can add it as a configurable parameter. |
ECI MODE NOT WORKING |
@mebjas Hi!Why this link can't work below: <script src="https://raw.githubusercontent.com/mebjas/html5-qrcode/master/minified/html5-qrcode.min.js"></script>But this one can work well <script src="https://cdn.bootcdn.net/ajax/libs/html5-qrcode/1.2.4/html5-qrcode.min.js"></script>maybe you forgot to update it |
Please I get this error when I try the script on a local machine Does anybody know what I am getting wrong? Thanks. |
Hi I get this error |
In your site demo, in addition to qrcode, I can also scan barcodes. But when I transfer the source code to my project, it only reads qrcode but does not read barcodes |
@Reza-kavian I was just working on that draft and had published it earlier in the demo website. Just published support for multiple types of barcode in version 2.0.0. Please take a look at latest version of code from Github release or npm |
@HusnulM & @Akanbiabubakar On what device / browser are you facing this issue? @jameshappykang - where did you get the CDN url from? Also, please note latest version is at |
Excellent, thank you very much for your practical and good project |
Wonderful library. Easy to use and works Great. Having issues with the camera image though:
This link is on a phone using a config of {fps: 10, qrbox: 225 } I tried removing the qrbox and then it wouldn't scan at all. |
getting this error on requesting camera access. |
@GuyInCorner Please file a new issue here - https://github.com/mebjas/html5-qrcode/issues/new/choose @lanost is it possible Chrome on ubuntu is not having camera permission, does any other camera based service works? |
@ HusnulM Please describe what is the issue? |
hi dear Minhaz, i got a pwa app which uses you camera QR library. It rund basically smothly on all modern devices but with iPhone 6 ufortunatly i got an issue. When i click to launch the camera, i got a message "unable to query supported devises". That occurs not in Safari browser directly but rather when my app is downloaded and force its loading from app drawer. Could you pls somehow guide me here? |
And yet, on iPhone 6 Plus i cannot access webcam. The same problem. What could be a reason? |
@mebjas Then I downgraded to 2.0.11 which is the most downloaded version, unfortunately it is also not working |
Error in /turbo_modules/html5-qrcode@2.1.2/html5-qrcode.min.js (4:60) |
Hi, im just testing your API and thanks for your job, it is just awesome. But i have problem with custom qrbox size. When i set config as below: const config = {qrbox: 250}; and i will pass it to html5Qrcode.start() everything works fine, as long as i don't try set custom dimensions. Then it just dissapears (div with id="qr-shaded-region" does not even exist). Even if i set them to the same values as above. Im using chrome. const config = {qrbox: {width: 250, height: 250}}; Where am i wrong? |
@Bratosz, I also faced same problem in mobile and ipad with portrait mode. we fixed the issue with some CSS. @mebjas: we have an issue "unable to query supported devices" with ipad (8. generation) and chrome latest version (96.0 version). demo also has same error. could you please let me know the fix? |
Hi @mebjas .. thanks for replying.. |
Any tips for getting QR code scanner to work on a Sony Bravia Professional Display (X1) with a USB camera. |
Hi hopefully this is very basic... |
thanks for great library. |
I want to override the buttons and qr scanner wrapper styling to be consistent with my application style. Is this possible? |
How can i configure the scanner to scan white barcodes?. |
After starting the scanner, how do we obtain the data embedded in the QR code? |
HTML5 QR Code scanning with javascript - launched v1.0.1 | Minhaz’s Blog
In 2015 I had written an HTML5 based QR code scanning library as a jQuery extension. Recently I realised there was some consistent traffic on my Github Project and the demo page. As I dug more into what was going on and I was embarrassed to see the poor design and obsolete support to the latest HTML APIs around Camera. I recently fixed some of the issues and refactored the javascript library that is now independent of jQuery and supports Promise based APIs. In this article I’ll explain how to use the new version of the library, some changes and reasons for them and existing issues and plan to fix them.
https://blog.minhazav.dev/HTML5-QR-Code-scanning-launched-v1.0.1/
The text was updated successfully, but these errors were encountered: