-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathdecodeVideo.html
More file actions
29 lines (27 loc) · 1.17 KB
/
Copy pathdecodeVideo.html
File metadata and controls
29 lines (27 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html>
<body>
<p>Please check if there are any remaining cameras available for connection.</p>
<p>
Opening the camera at a non-secure site may fail.
Please refer to <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Security" target="_blank">this</a>
for more info.
</p>
<!--
Warning: Use a specific version in production. (e.g. https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@x.x.x/dist/dbr.min.js)
Visit https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx to get key.
-->
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode/dist/dbr.min.js" data-licensekey="t0068MgAAAAxT9peWqAbLNI2gDlg9yk8dqzhp5Me5BNCgFIg2p5X+8TPYghCr9cz6TNFlkmkpzOJelNHJaQMWGe7Bszoxoo4="></script>
<script>
let scanner = new BarcodeReader.Scanner({
onFrameRead: results => {console.log(results);},
onNewCodeRead: (txt, result) => {alert(txt);}
});
scanner.open().catch(ex=>{
console.log(ex);
alert(ex.message || ex);
scanner.close();
});
</script>
</body>
</html>