vue-qrcode-reader
vue-qrcode-reader copied to clipboard
Shape Detection API - inverted qr
Hello, the use of Shape Detection API removed the ability to scan inverted QR. This worked realy well with previous version 2.3.18. Is there a way to get inverted qr to work with Shape Detection API? All our qr-codes are laser engraved on black metal.
Please give us an option to be able to scan inverted QR like an optionnal props ? my whole app for a client depend on this feature
I expected to make faster progress on the Shape Detection API polyfill. Besides bringing back support for inverted QR codes it’s supposed to introduce support for all kinds of other Barcode types. Unfortunately I’m a too busy at the moment.
If you need an awkward but relatively quick workaround would be to adjust this string:
https://github.com/gruhn/barcode-detector-polyfill/blob/41d64b7d75b10d099158c528e257e4e0a48fb171/src/worker/worker.ts#L13
to attemptBoth, onlyInvert or invertFirst; Deploy a fork of barcode-detector-polyfill. Then also fork vue-qrcode-reader and install your adjusted version of barcode-detector-polyfill
thank you gruhn. this worked perfectly.
@gruhn what prevents fixing this? What support is needed? 🙂
Me being busy. If you would like to help, I‘d gladly merge your PR. Only requirement: I can test it without having to do any local setup. Ideally just modify the demo page and deploy it through your fork. A GitHub action is already configured.
Would an acceptable fix be to basically implement your workaround by changing the default in the barcode-detector-polyfill to 'attemptBoth'. Then releasing a new version of it and then updating the dependency on this library? I mean do you see any drawbacks int not making it configurable but changing the default?
Apparently it’s 50% slower or something but yes it would be acceptable from my side.
I checked the demo page. Seems to work now. I'm closing this.