-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdbrjs-iphone15-ios17.html
29 lines (28 loc) · 1.13 KB
/
dbrjs-iphone15-ios17.html
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>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body>
<script src="https://download2.dynamsoft.com/dbr/dynamsoft-barcode-reader-js/dynamsoft-barcode-reader-js-9.6.30/dist/dbr.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/eruda/2.4.1/eruda.min.js"></script>
<script>
try{
eruda.init();
}catch(_){}
// Specifies a license, you can visit https://www.dynamsoft.com/customer/license/trialLicense?ver=9.6.30&utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
Dynamsoft.DBR.BarcodeScanner.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
// Initializes and uses the SDK
(async () => {
let scanner = await Dynamsoft.DBR.BarcodeScanner.createInstance();
scanner.onFrameRead = results => {
if (results.length > 0) console.log(results);
};
scanner.onUniqueRead = (txt, result) => {
alert(txt);
};
await scanner.show();
})();
</script>
</body>
</html>