dwa012 / html5-qrcode

A cross platform HTML5 QR code reader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'qrcode' is not defined

vincentwinkel opened this issue · comments

Hi,
When I use your js version on demo page, it works perfectly (event if html5_qrcode_stop() method isn't implemented), but when I use lib/html5-qrcode.min.js as you say, I've an error during initialization :
"Uncaught ReferenceError: qrcode is not defined" and effectively, you attach some callbacks to this variable but I don't find its declaration.
Regards,
Vincent

me too.exactly same problem. vincent did you found a solution?

you need to include both the libs/jsqrcode-combined.min.js and the lib/html5-qrcode.min.js (in that order).
They're not combined into one file (which I think is probably the case on the demo page).

I guess the build routine should be modified to create a single distribution file with both the jsqrcode src and the html5-qrcode src combined and minified.
I'll create a PR for this

PR created: Pull Request #29
If this gets merged then you'll be able to use it the same way as the demo, just by including the lib/html5-qrcode.min.js on it's own