dwa012 / html5-qrcode

A cross platform HTML5 QR code reader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is there a way to stop the qrcode & camera

sabkaraja opened this issue · comments

I am using the qrcode in div which was launched in a modal window. How do I stop the QR Code & camera after capturing code.

What did you do to fix this. It looks like there is no stop function to call here https://github.com/dwa012/html5-qrcode/blob/master/lib/jsqrcode-combined.min.js. But there is a stop function in in this code https://github.com/dwa012/html5-qrcode/blob/master/lib/html5-qrcode.min.js but this code doesn't have the qrcode reader. Please let me know what you did to stop the camera. Thanks!

The way I managed to get it done was redirecting the user to another page. In this way, I could stop it.

When I wanted to scan a qrcode, I redirected to scanner.html which scanned the code. Once I get the scan, I redirected the user to result page (and sent the data in parameter). It was a hack, but worked for me.