html5-qrcode
html5-qrcode copied to clipboard
Someone has a basic example code?
I'm new at the library and I don't know how it works, I tried with this code, but I can't make it works :(
<!DOCTYPE html>
<html lang="es">
<head>
<title>Lector de códigos</title>
<script type="text/javascript" src="html5-qrcode.min.js"></script>
</head>
<body>
<div id="reader" style="width:300px;height:250px">
</div>
<script type="text/javascript">
$('#reader').html5_qrcode(function(data){
// do something when code is read
},
function(error){
//show read errors
}, function(videoError){
//the video stream could be opened
}
);
</script>
</body>
</html>
Can someone help me, please?
try this : delete "type='text/javascript' " in the first
@alexchvrches you need to add this:
<head>
<title>Lector de códigos</title>
<script type="text/javascript" src="https://raw.githubusercontent.com/dwa012/html5-qrcode/master/lib/jsqrcode-combined.min.js"></script>
<script type="text/javascript" src="html5-qrcode.min.js"></script>
</head>
or download the script
请问成功了吗?我这边没成功