gruhn / vue-qrcode-reader

A set of Vue.js components for detecting and decoding QR codes.
https://gruhn.github.io/vue-qrcode-reader
MIT License
2.09k stars 334 forks source link

Feature to allow scanning of same code multiple times #219

Closed samipetteri closed 3 years ago

samipetteri commented 3 years ago

Right now it is not possible to read same qr-code in repetition. We would like to use it so that you could reset that flag with a button so the next code could be the same as the one before.

Meaning, we would like to be able to reset the contentBefore from code below to null programmatically.

https://github.com/gruhn/vue-qrcode-reader/blob/dd7f55bf3ba6ba1944069164a33b5677864d1040/src/misc/scanner.js#L38

gruhn commented 3 years ago

Please read the "TIP" section in the api docs of the decode event:

https://gruhn.github.io/vue-qrcode-reader/api/QrcodeStream.html#decode

Also checkout the Pause & Validate demo for an implementation example.

samipetteri commented 3 years ago

Changing the camera is slow operation and makes the feel ankward so thats why we dont like to use it. I guess we well figure out something else 👍

gruhn commented 3 years ago

I assumed it's always fine to bridge the time gap with maybe 1000 milliseconds of micro interaction.

Otherwise, can you please elaborate your use case?