Open samvandamme opened 1 year ago
Confirm
Confirm
Which version of the library?
Hi!
Version 2.3.7. I'm loading through importmap script type. Do I use it correctly or missing something? Loading html5-qrcode.min.js directly works as expected.
<script type="importmap">{
"imports": {"html5-qrcode": "https://ga.jspm.io/npm:html5-qrcode@2.3.7/esm/index.js"}
}</script>
And use it as
import { Html5Qrcode } from "html5-qrcode"
...
let scanner = new Html5Qrcode("reader")
Which results
TypeError: undefined is not an object (evaluating 'e.QR_CODE')
ZXingHtml5QrcodeDecoder — zxing-html5-qrcode-decoder.js:6
Html5QrcodeShim — code-decoder.js:52
Html5Qrcode — html5-qrcode.js:104
Hello, have you found any solutions? @samvandamme
Hello, have you found any solutions? @samvandamme
No, we started using another library: https://github.com/nimiq/qr-scanner
Describe the bug After getting the camera's and when you run
html5QrCode.start
, I'm getting the error Safari:TypeError: undefined is not an object (evaluating 'e.QR_CODE')
Chrome:TypeError: Cannot read properties of undefined (reading 'QR_CODE')
To Reproduce Using the "hard" version
import { Html5Qrcode } from "html5-qrcode"
Expected behavior Not getting the error, but filling the div with the camera stream.
Desktop (please complete the following information):