diff --git a/.gitignore b/.gitignore index 90b92e88..93e73f83 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ yarn.lock !/dist/README.md !/README.md +!/README.NODE.md !/package.json !/LICENSE diff --git a/README.md b/README.md index 0ea480ed..6dd1a902 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@  -[Dynamsoft JavaScript Barcode SDK for Web](https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx) is a JavaScript library for barcode scanning based on the **WebAssembly** technology. It supports real-time localization and decoding of various barcode types. The library is capable of scanning barcodes from static images as well as directly from live video streams. It also supports reading multiple barcodes at once. +[Dynamsoft JavaScript Barcode SDK](https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx) is a JavaScript library for barcode scanning based on the **WebAssembly** technology. It supports real-time localization and decoding of various barcode types. The library is capable of scanning barcodes from static images as well as directly from live video streams. It also supports reading multiple barcodes at once. -> Also see [Dynamsoft JavaScript Barcode SDK for Node](https://github.com/dynamsoft-dbr/node-javascript-barcode). +> Also see [Dynamsoft JavaScript Barcode SDK for Node](https://github.com/Dynamsoft/javascript-barcode/blob/master/README.NODE.md). ## Install @@ -25,9 +25,9 @@ $ npm install dynamsoft-javascript-barcode --save cdn ```html - + - + ``` [Download zip](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js) @@ -36,7 +36,7 @@ cdn Please visit https://www.dynamsoft.com/customer/license/trialLicense to get a valid license and update `PRODUCT-KEYS`: ```html - + ``` ## Quick Usage @@ -45,7 +45,7 @@ Please visit https://www.dynamsoft.com/customer/license/trialLicense to get a va
- + + + ``` The same can be done with other CDNs like `unpkg` ```javascript - + ``` > **NOTE**: : Since we do change the library a bit in each release, to make sure your application doesn't get interrupted by automatic updates, use a specific version in your production environment, as shown above. Using a general major version like `@7` is not recommended. @@ -389,26 +389,35 @@ As you can see in the code, there are three categories of configurations. e.g. ```js - await barcodeScanner.updateRuntimeSettings("single"); + await scanner.updateRuntimeSettings("single"); ``` ```js - await barcodeScanner.updateRuntimeSettings("speed"); + await scanner.updateRuntimeSettings("speed"); ``` ```js - await barcodeScanner.updateRuntimeSettings("balance"); + await scanner.updateRuntimeSettings("balance"); ``` ```js - await barcodeScanner.updateRuntimeSettings("coverage"); + await scanner.updateRuntimeSettings("coverage"); ``` ```js - let settings = await barcodeScanner.getRuntimeSettings(); + let settings = await scanner.getRuntimeSettings(); settings.localizationModes = [ Dynamsoft.DBR.EnumLocalizationMode.LM_CONNECTED_BLOCKS, Dynamsoft.DBR.EnumLocalizationMode.LM_SCAN_DIRECTLY, Dynamsoft.DBR.EnumLocalizationMode.LM_LINES, 0, 0, 0, 0, 0]; settings.deblurLevel = 2; - await barcodeScanner.updateRuntimeSettings(settings); + await scanner.updateRuntimeSettings(settings); ``` + + See [Barcode reading settings Guide](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/user-guide.html?ver=latest#use-publicruntimesettings-struct-to-change-settings) for basic usage. + + See [C++ API RuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html) for more details. + + To find out which settings best suit your usage scenario, visit [DBR Main Online Demo](https://demo.dynamsoft.com/barcode-reader/). + + Any questions, please contact [Dynamsoft support](https://www.dynamsoft.com/Company/Contact.aspx). + * `get/updateScanSettings`: Configures the behavior of the scanner which includes `duplicateForgetTime`, `intervalTime`, etc. ### Customizing the UI @@ -431,7 +440,7 @@ The following introduces the 3rd way. Check out the following code on how it's d - + + diff --git a/example/web/debug/public/index.html b/example/web/debug/public/index.html index e7d1efa5..a9a74cd8 100644 --- a/example/web/debug/public/index.html +++ b/example/web/debug/public/index.html @@ -18,7 +18,7 @@ - + + + + + diff --git a/example/web/typescript/package.json b/example/web/typescript/package.json index f09a3392..73b5cb15 100644 --- a/example/web/typescript/package.json +++ b/example/web/typescript/package.json @@ -2,7 +2,7 @@ "name": "dbrjs-ts", "version": "1.0.0", "dependencies": { - "dynamsoft-javascript-barcode": "8.1.2", + "dynamsoft-javascript-barcode": "8.1.3", "@types/node": "^13.9.8", "typescript": "^3.8.3" } diff --git a/example/web/typescript/script.ts b/example/web/typescript/script.ts index 66ffb267..66798d03 100644 --- a/example/web/typescript/script.ts +++ b/example/web/typescript/script.ts @@ -1,6 +1,6 @@ ///