Uncaught ReferenceError: qrcode is not defined
salbiz opened this issue · comments
salbiz commented
Uncaught ReferenceError: qrcode is not defined
Konstantinos Chasiotis commented
I get the same error, here is my code
<html>
<head>
<title>Title of the document</title>
<script
src="https://code.jquery.com/jquery-2.2.3.min.js"
integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo="
crossorigin="anonymous"></script>
<script src="./html5-qrcode-master/lib/html5-qrcode.min.js"></script>
</head>
<body>
<div id="reader" style="width:300px;height:250px"></div>
<script>
$('#reader').html5_qrcode(function (data) {
// do something when code is read
alert(data);
},
function (error) {
//show read errors
}, function (videoError) {
//the video stream could be opened
}
);</script>
</body>
</html>
Edit:
Based on a previous issue you just include those scripts in that specific order. Sadly the instruction is missing from the readme.md
<script src="html5-qrcode-master/lib/jsqrcode-combined.min.js"></script>
<script src="html5-qrcode-master/lib/html5-qrcode.min.js"></script>
Ajay Poshak commented
Yeah, I also had the same issue. Thanks to you, its been resolved now.
I think they should include it in readme also.
Hey @dwa012 , please add this in readme or grant me the collaborator access so that I can do it and close this issue.