quaggaJS icon indicating copy to clipboard operation
quaggaJS copied to clipboard

QR code support

Open mrtomnguyen opened this issue 6 years ago • 9 comments

any way to add QR scan?

mrtomnguyen avatar Jul 25 '18 22:07 mrtomnguyen

I am also interested in this, but looking through the history of question and request, this is an old one: https://github.com/serratus/quaggaJS/issues/2 https://github.com/serratus/quaggaJS/issues/120

Are there plans to add this, and are there any workaround or wrapper to do this?

memic84 avatar Aug 02 '18 07:08 memic84

It is likely that the qr reader could be extracted from here : https://github.com/cozmo/jsQR

siemiatj avatar Oct 03 '18 10:10 siemiatj

I have been able to get this working with the https://github.com/zxing-js/library

memic84 avatar Oct 06 '18 10:10 memic84

Seems we have a few people who have managed to get this to work in the various Issues that request it. Anyone care to take a stab at figuring out a good and proper way to include it into the project?

ericblade avatar Oct 07 '18 02:10 ericblade

@memic84 But you dumped quagga or extracted the qr reader ?

siemiatj avatar Oct 09 '18 00:10 siemiatj

@siemiatj I didn't use Quagga, but used zxing-js completely, and implemented my own component. Quagga has ofcourse better support for 1D codes, while the latter has only EAN-13. But i only needed EAN-13 barcode format.

memic84 avatar Oct 09 '18 08:10 memic84

I did both, just added a 2s delay. So first I'm trying to find a QR code with zxing, and then switch to quagga.

siemiatj avatar Jan 21 '19 22:01 siemiatj

Found a solution on a fork of this project: https://github.com/ericblade/quagga2-reader-qr/blob/master/example/src/App.tsx

Ridder90 avatar Dec 30 '19 12:12 Ridder90

fwiw, my fork does have an experimental support for attaching external readers, it's not 100%, though. Seems to work in node and browser, as long as you set workers to 0, haven't tested it with live decoding yet, though, trying to get a bunch of maintenance tasks done, and figure out a way to automated test live decode to some degree... probably need to simulate the media devices interface with provided images somehow.. hmm.

ericblade avatar Dec 30 '19 18:12 ericblade