-
Notifications
You must be signed in to change notification settings - Fork 5
QR and barcode scanner using HTML and Javascript | Minhaz’s Blog #21
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
Comments
Hello, is there a way to use the barcode scanner without ssl ? Your sincerly Stephan |
The browsers don't support showing camera feed without SSL. It should work with localhost though. |
I tested this code and it only scan qr code, but not for barcode 39 and 128. Should I load barcode library or just this script is enough? <script src="https://unpkg.com/html5-qrcode" type="text/javascript"></script> |
hello, i need helpp, i dont get any result back when it's scanned, also when im uploading image, but when i try in this demo website it's work fine, but not in my code/.. |
Sorry, I'm being stupid. I put the |
@Bryan-snw is there a place we can review your code?
Put this after the <div id="reader" width="600px"></div>
<!-- rest of your code -->
<!-- include the library -->
<script src="https://unpkg.com/html5-qrcode" type="text/javascript">
<script type="text/javascript">
/** Initialisation code comes here */
</script> |
I am testing on iPhone, after scanning nothing happens? What should happen in demo? Should there be an alert about the info scanned or what? |
Question - Run npm run-script build to build JavaScript output. The output JavaScript distribution is built to /dist/html5-qrcode.min.js. If you are developing on Windows OS, run npm run-script build-windows. I am trying to build. Since i am working on windows, i tried the following command npm run-script build-windows. Now I am getting the following error: |
i tried scanning a UPC-A code but it does not read the barcode. i have tested QR codes and they work. any reason why the UPC-A wont work? the barcode was printed using a Zebra barcode printer. |
How can I change the zoom of camera in js? |
Im using this module for my project. its working fine with every Bar-Code. which length is smaller than 12 characters only work fine. but when I use industry standard Bar-Code of 19 characters nothing will happen. |
Hello Minhaz! Congrats! This plugin works well, easy install and usage and very fast, i love it! Take all my appreciation! But i have a question :] : BR, |
see the console tab in developer tools or put this code to the souce:
});` |
Using the demo embedded here on my iphone X its unable to read some of the barcodes on my laptop screen from the supported codes section including UPC_A and UPC_E. It does work with QR codes and some other barcodes on that page. Is that expected for the demo? Would it work for UPC_A UPC_E in a full implementation? Thanks |
Same here - not able to scan UPCs on iOS or macOS. Seems to work on Chrome on Android. |
I implemented it in my webapp running it on safari iPhone X I find that it doesnt work with UPC_A (the label used for food and retail products in my country (canada). Tested on physical products with UPC_A label as well as online generated UPC_A label https://barcode.tec-it.com/en/UPCA?data=72527273070 A note aswell, the example UPC_A included in this page does not look the same as UPC_A 's i find on physical products and generated online |
I have implemented locally. But After giving camera permission. Not showing list of camera in select Camera. So please let me know how can i resolve this? |
hello master please when i scan barcode |
Hello, Thanks. |
Can I use the Barcode Scanner for commercial reasons? And is there a way to make the scanning processes in the whole camera view and not only the marked section? |
I thinks QR code and Barcode format is different, I'm succesfully implement QR code scanner in web based with ease, but still struggling make barcode scanning works. As far as I know, QR code using 2D matrix data to easily read by the reader/camera while barcode using font to generate barcode, different in read handling. CMIIW |
Some QR Code scan gives different-different results |
Hi, i've problems with scanning colored qr. p.e. white qr on black ground. Kind regards, |
If you want the result to come out as shown in the example, replace: This: For this: I hope it works for you. |
Hi, |
Hi Minhaz, Great write-up thanks for making this available. Scanning a standard 13-digit barcode works as expected on Android devices but just can't get it to scan on iOS devices. The camera comes on, no issue there, but it just won't capture/read the barcode. |
iPhone11 not working. not reading why? |
It works in the demo, but when I try to set it up in an HTML-file with a script section, it doesn't find camera options. The light of my camera goes on, though, after clicking 'ask camera permission' but the dropdown of camera's only has one option with an empty text and value (so ). After calling Html5Qrcode.getCameras(), I get an empty id and empty label. How is it possible that it works in the demo, but not in my own html and .js file? |
this is working in the browser , but not showing up in the webview.. have anyone used this in the webview ??? |
A good one. Great article Minhaz. |
Game changing solution, works perfectly. I'm stuck only with long C128 codes like this: BJ0WX0E9500V1NAQ0186 try to code into Code-128 barcode - this barcode can't be recognized, however barcode scanning iOS/Android apps regognize it well(( |
Hi, are there any plans to add DPM Data Matrix reading |
Hi, I am trying to scan Texas Driver's License, which is in PDF417 format but it is not scanning. Did any body successfully any PDF417 barcode? |
QR and barcode scanner using HTML and Javascript | Minhaz’s Blog
The little QR code scanning library I have been maintaining since 2015 has been getting more attention recently. And with power came responsibilities, bugs, and feature requests. Some of the key features requested by developers were more reliable scanning and the ability to scan different types of bar codes. With version 2.0.0 onwards developers can scan different types of 1D codes (bar codes) and 2D codes (like QR codes or AZTEC). This article lists out everything new in version 2.x.x. I’ll also list out the new APIs and capabilities that developers can use to integrate a more powerful code scanning capability to their web pages or apps.
https://blog.minhazav.dev/QR-and-barcode-scanner-using-html-and-javascript/
The text was updated successfully, but these errors were encountered: