mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
4.92k stars 960 forks source link

Use Html5Qrcode without Html5QrcodeScanner with native js #540

Open Mathias89 opened 2 years ago

Mathias89 commented 2 years ago

Bug html5-qrcode.min.js includes the scanner with UI. To save bandwidth, it would be great to have a version without it.

In this case, only code for detection is required. Are there any other alternatives?

mebjas commented 1 year ago

Is this because the library is getting very big otherwise?

Do you have an estimate of library size with and without the Html5QrcodeScanner class in minified form?

reneroth commented 1 year ago

In general it seems advantageous to cut down on dependencies. I for example only need the detection code that allows me to detect a QR code from an image file, but I still need to import the whole UI code and actually provide an (invisible) UI for the library to work. For some reason, this library can detect codes that the stock zxing won't detect, but I don't need all the automatic scaffolding around it 🤷🏻 I think a headless mode would be great!