bootstrap & jquery plugins
This commit is contained in:
parent
538e65c5a9
commit
5b6acb389f
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"History": [
|
||||
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>JQuery HTML5 QR Code Scanner using Instascan JS Example - ItSolutionStuff.com</title>
|
||||
|
||||
<script src="js/jquery.min.js"></script>
|
||||
|
||||
<script src="js/instascan.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<h1>JQuery HTML5 QR Code Scanner using Instascan JS Example - ItSolutionStuff.com</h1>
|
||||
|
||||
|
||||
|
||||
<video id="preview"></video>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
|
||||
|
||||
scanner.addListener('scan', function (content) {
|
||||
|
||||
alert(content);
|
||||
|
||||
});
|
||||
|
||||
Instascan.Camera.getCameras().then(function (cameras) {
|
||||
|
||||
if (cameras.length > 0) {
|
||||
|
||||
scanner.start(cameras[0]);
|
||||
|
||||
} else {
|
||||
|
||||
console.error('No cameras found.');
|
||||
|
||||
}
|
||||
|
||||
}).catch(function (e) {
|
||||
|
||||
console.error(e);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue