|
12 | 12 |
|
13 | 13 | <body> |
14 | 14 | Loading... |
15 | | - <script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.2.13/dist/dbr.js"></script> |
| 15 | + <script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.3.0/dist/dbr.js"></script> |
16 | 16 | <script> |
17 | 17 | /** LICENSE ALERT - README |
18 | 18 | * To use the library, you need to first specify a license key using the API "license" as shown below. |
|
23 | 23 | /** |
24 | 24 | * You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days. |
25 | 25 | * Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license. |
26 | | - * For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.2.13&utm_source=github#specify-the-license or contact support@dynamsoft.com. |
| 26 | + * For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.3.0&utm_source=github#specify-the-license or contact support@dynamsoft.com. |
27 | 27 | * LICENSE ALERT - THE END |
28 | 28 | */ |
29 | 29 |
|
30 | 30 | (async function() { |
31 | 31 | try { |
32 | 32 | const scanner = await Dynamsoft.DBR.BarcodeScanner.createInstance(); |
33 | 33 | /** |
34 | | - * onFrameRead is triggered after the library finishes reading a frame image. |
| 34 | + * 'onFrameRead' is triggered after the library finishes reading a frame image. |
35 | 35 | * There can be multiple barcodes on one image. |
36 | 36 | */ |
37 | 37 | scanner.onFrameRead = results => { |
|
42 | 42 | } |
43 | 43 | }; |
44 | 44 | /** |
45 | | - * onUniqueRead is triggered only when a 'new' barcode is found. |
| 45 | + * 'onUniqueRead' is triggered only when a 'new' barcode is found. |
46 | 46 | * The amount of time that the library 'remembers' a barcode is defined by |
47 | 47 | * "duplicateForgetTime" in "ScanSettings". By default it is set to 3000 ms. |
48 | 48 | */ |
49 | 49 | scanner.onUniqueRead = (txt, result) => { |
50 | | - alert(txt); |
51 | | - console.log("Unique Code Found: ", result); |
52 | | - } |
53 | | - /** |
54 | | - * show() opens the camera and shows the video stream on the page. |
55 | | - * After that, the library starts to scan the frame images continuously. |
56 | | - */ |
| 50 | + alert(txt); |
| 51 | + console.log("Unique Code Found: ", result); |
| 52 | + } |
| 53 | + /** |
| 54 | + * 'show()' opens the camera and shows the video stream on the page. |
| 55 | + * After that, the library starts to scan the frame images continuously. |
| 56 | + */ |
57 | 57 | await scanner.show(); |
58 | 58 | } catch (ex) { |
59 | 59 | let errMsg; |
|
0 commit comments