|
5 | 5 | <meta charset="utf-8"> |
6 | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
7 | 7 | <title>Dynamsoft Barcode Reader Sample - Hello World (Decoding via Camera)</title> |
8 | | - <script src="https://cdn.jsdelivr.net/npm/keillion-dynamsoft-javascript-barcode@0.20210429140551.0/dist/dbr.js"></script> |
| 8 | + <script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.2.3/dist/dbr.js"></script> |
9 | 9 | </head> |
10 | 10 |
|
11 | | -<!-- |
12 | | - This sample demonstrates the minimum necessary JavaScript code to get the BarcodeScanner (video) up and running. |
13 | | - The BarcodeScanner object is initialized with its default UI once the user clicks the 'Read Barcode via Camera' button. |
14 | | - Any unique barcode results that are found are then displayed in an alert box to the user. |
15 | | ---> |
16 | | - |
17 | 11 | <body> |
18 | 12 | <h2>Minimum Code to Read Barcodes</h2> |
19 | 13 | <button id='readBarcode'>Read Barcode via Camera</button> |
20 | 14 | <script> |
21 | | - /** |
| 15 | + /** LICENSE ALERT - README |
22 | 16 | * The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license. |
23 | | - * |
24 | | - * If nothing is specified, a 7-day (public) trial license will be used by default. |
25 | | - * |
| 17 | + * If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample. |
26 | 18 | * Note that network connection is required for this license acquisition to work. |
27 | 19 | */ |
28 | 20 |
|
29 | | - /** |
30 | | - * All licenses belong to a specific organization, therefore, you can acquire your licenses |
31 | | - * by first specifying the ID of your organization. |
32 | | - * |
33 | | - * You can get your own organization with licenses by |
34 | | - * - Requesting a private trial/evaluation license |
35 | | - * - Or, purchasing a commercial/deployment license |
36 | | - * |
37 | | - * Once you get your own organization, uncomment the following line of code and put your ID there. |
38 | | - */ |
39 | | - |
40 | | - // Dynamsoft.DBR.BarcodeReader.organizationID = "123***7"; |
41 | | - |
42 | | - /** |
43 | | - * Licenses of an organization are grouped by handshake codes. After specifying the organization, |
44 | | - * you can further specify the handshake code as a more precise way to use only the licenses configured |
45 | | - * to that handshake code. If no handshake code is specified, the default handshake code is used. |
46 | | - */ |
47 | | - |
48 | | - // Dynamsoft.DBR.BarcodeReader.handshakeCode = "A-Specific-HandshakeCode"; |
| 21 | + /* When using your own license, please uncomment the following lines and fill in your own information. */ |
| 22 | + /* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */ |
49 | 23 |
|
50 | | - /** |
51 | | - * To protect your licenses, you can specify a session password. |
52 | | - * |
53 | | - * This password corresponds to the handshake code specified by the above API "handshakeCode" |
54 | | - * or the default one if no handshakeCode is specified. |
55 | | - * |
56 | | - * Read more about [How can I protect my license?](https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-can-i-protect-my-license) |
57 | | - */ |
| 24 | + // Dynamsoft.DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID"; |
| 25 | + // Dynamsoft.DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE"; |
| 26 | + // Dynamsoft.DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license. |
| 27 | + // Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS |
58 | 28 |
|
59 | | - // Dynamsoft.DBR.BarcodeReader.sessionPassword = "Your-Session-Password"; |
| 29 | + /* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */ |
60 | 30 |
|
61 | | - /** |
62 | | - * The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. |
63 | | - * |
64 | | - * Contact support@dynamsoft.com for more information. |
65 | | - */ |
66 | | - |
67 | | - // Dynamsoft.DBR.BarcodeReader.productKeys = "Your-Product-Keys"; |
| 31 | + // Dynamsoft.DBR.BarcodeReader.productKeys = "YOUR-PRODUCT-KEY"; |
68 | 32 |
|
| 33 | + /** LICENSE ALERT - THE END */ |
69 | 34 |
|
70 | | - Dynamsoft.DBR.BarcodeReader.organizationID = "100448235"; |
71 | | - |
72 | 35 | let scanner = null; |
73 | 36 | document.getElementById('readBarcode').onclick = async function () { |
74 | 37 | try { |
|
0 commit comments