From 8ec85d8bb655a68cb5a8c1d68eba7c371f20f9d6 Mon Sep 17 00:00:00 2001 From: DMGithubPublisher Date: Tue, 18 Feb 2025 16:17:27 +0800 Subject: [PATCH 1/3] update to internal commit ae4cb82a --- .../javascript/samples-demos/index.md | 2 +- .../javascript/faq/add-remove-beep-sound.md | 4 ++- ...etween-barcodeReader-and-barcodeScanner.md | 1 - ...ence-between-bestspeed-and-bestcoverage.md | 9 +++--- ...VideoSettings-and-updateRuntimeSettings.md | 14 --------- .../faq/read-from-existing-files.md | 13 +-------- .../javascript/faq/scan-US-drivers-license.md | 2 +- ...rver-requirements-for-dbr-js-deployment.md | 29 +++++++++++++++++++ .../faq/unable-to-scan-aztec-code.md | 8 ----- programming/javascript/user-guide/index.md | 8 ++--- 10 files changed, 43 insertions(+), 47 deletions(-) create mode 100644 programming/javascript/faq/server-requirements-for-dbr-js-deployment.md diff --git a/programming-old/javascript/samples-demos/index.md b/programming-old/javascript/samples-demos/index.md index 1d554c22..b440cd86 100644 --- a/programming-old/javascript/samples-demos/index.md +++ b/programming-old/javascript/samples-demos/index.md @@ -27,7 +27,7 @@ permalink: /programming/javascript/samples-demos/index.html
Read + whether on mobile or desktop." class="button title" target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/hello-world/hello-world.html">Read an Existing Image
+ Version 9 This feature is controlled using the [whenToPlaySoundforSuccessfulRead](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interface/ScanSettings.html?ver=latest) property. To enable the feature, set the property to either **frame** or **unique**. To disable the feature, set it to **never**. > This feature is disabled by default. + \ No newline at end of file diff --git a/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md b/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md index 96fa3657..5ab3601f 100644 --- a/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md +++ b/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md @@ -9,7 +9,6 @@ needAutoGenerateSidebar: false # What is the difference between the BarcodeReader class and the BarcodeScanner class? Can they be used interchangeably? [<< Back to FAQ index](index.md) - **_NOTE:_** - This is for version 9 or lower of barcode reader sdk No, as each offers a different functionality than the other. The `BarcodeReader` class is used to decode static images (via one of the [decode\*](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/BarcodeReader.html#decode-barcodes) methods) and does not have the ability to open the camera stream and decode barcodes directly from the video stream. diff --git a/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md b/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md index 6dec5cc2..0e70a830 100644 --- a/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md +++ b/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md @@ -10,13 +10,12 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -`SpeedFirst`, as the name suggests, prioritizes time cost over the accuracy of the results, and `ReadRateFirst` is vice versa. +`speed`, as the name suggests, prioritizes time cost over the accuracy of the results, and `coverage` is vice versa. -`Balance` is the perfect middle ground between `SpeedFirst` and `ReadRateFirst`. +`balance` is the perfect middle ground between `speed` and `coverage`. -Lastly, the `Single` template is optimized for interactive video scenarios, and is the default mode. - -To choose the proper template that you want the SDK to utilize and learn about some of the other templates we offer, please use the [PresetTemplate](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/preset-templates.html?product=dbr&lang=javascript). +Lastly, the `single` template is optimized for interactive video scenarios, and is the default mode when using the `BarcodeScanner` class. In terms of the individual settings, if you would like to learn of the exact breakdown between the different templates, please contact the [Dynamsoft support team](https://www.dynamsoft.com/contact/). +To choose the runtime settings template that you want the SDK to utilize and learn about some of the other templates we offer, please use the [updateRuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeReader.html#updateruntimesettings) method. diff --git a/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md b/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md index c68c087e..dac17e80 100644 --- a/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md +++ b/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md @@ -10,20 +10,6 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -## Version 10 -`updateVideoSettings` is used to update the [MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints) that define most of the video information such as width, height, and the camera facingMode (i.e. front or rear camera). - -`updateSettings` is used to update the [SimplifiedSettings](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/simplified-capture-vision-settings.html?product=dbr&lang=javascript) interface. It updates the runtime settings with a given template object. -```javascript -let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); -settings.barcodeSettings.barcodeFormatIds = - Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; -await router.updateSettings("ReadSingleBarcode", settings); -await router.startCapturing("ReadSingleBarcode"); -``` - -## Version 9 - `updateScanSettings` is used to update the [ScanSettings](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/interface/ScanSettings.html?ver=latest) interface. This can be used to configure settings such as ignoring duplicate reads, setting sound/vibration when a barcode is scanned. `updateVideoSettings` is used to update the [MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints) that define most of the video information such as width, height, and the camera facingMode (i.e. front or rear camera). diff --git a/programming/javascript/faq/read-from-existing-files.md b/programming/javascript/faq/read-from-existing-files.md index 687a7897..79158da7 100644 --- a/programming/javascript/faq/read-from-existing-files.md +++ b/programming/javascript/faq/read-from-existing-files.md @@ -10,19 +10,8 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -Yes, the JavaScript SDK supports reading from a file in local memory. +Yes, the JavaScript SDK supports reading from a file in local memory. This can be achieved via the `BarcodeReader` class instead of the `BarcodeScanner` class. -## Version 10.x -```javascript -let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance(); -// Use the router to perform a job. -let results = await router.capture("blob:https://demo.dynamsoft.com/afb84bd2-e8cb-4b96-92b6-36dc89783692", "ReadSingleBarcode"); -// ... -// Release the resources after the job is finished. -router.dispose(); -``` - -## Version 9.x ```javascript let reader = await Dynamsoft.DBR.BarcodeReader.createInstance(); let results = await reader.decode(imageSource); diff --git a/programming/javascript/faq/scan-US-drivers-license.md b/programming/javascript/faq/scan-US-drivers-license.md index dbbf76c1..e96dc5ed 100644 --- a/programming/javascript/faq/scan-US-drivers-license.md +++ b/programming/javascript/faq/scan-US-drivers-license.md @@ -10,4 +10,4 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -You can scan a US driver's license to get all of these details using our SDK. The best way to do so is to follow our pre-built driver license sample for the JavaScript edition, which can be found in the [code gallery](https://github.com/Dynamsoft/barcode-reader-javascript-demo). This sample can also be found in the `samples\4.use-case` folder of the JavaScript package download (via the Dynamsoft [free trial download](https://www.dynamsoft.com/barcode-reader/downloads)). +You can scan a US driver's license to get all of these details using our SDK. The best way to do so is to follow our pre-built driver license sample for the JavaScript edition, which can be found in the [code gallery](https://www.dynamsoft.com/barcode-reader/resources/code-gallery/?SampleID=619). This sample can also be found in the `samples\4.use-case` folder of the JavaScript package download (via the Dynamsoft [free trial download](https://www.dynamsoft.com/barcode-reader/downloads)). diff --git a/programming/javascript/faq/server-requirements-for-dbr-js-deployment.md b/programming/javascript/faq/server-requirements-for-dbr-js-deployment.md new file mode 100644 index 00000000..2d7b0900 --- /dev/null +++ b/programming/javascript/faq/server-requirements-for-dbr-js-deployment.md @@ -0,0 +1,29 @@ +--- +layout: default-layout +title: What are the server requirements for Dbr JS deployment? +keywords: Dynamsoft Barcode Reader, FAQ, tech basic, server requirements, deployment +description: What are the server requirements for Dbr JS deployment? +needAutoGenerateSidebar: false +--- + +# What are the server requirements for Dbr JS deployment? + +[<< Back to FAQ index](index.md) + +To deploy DBR-JS to the server, you need to + + 1. Set the MIME type for `.wasm` as `application/wasm` on your webserver. + + The goal is to configure your server to send the correct Content-Type header for the wasm file so that it is processed correctly by the browser. + + Different types of webservers are configured differently, for example: + + + Apache + + IIS + + NGINX + + 2. Enable HTTPS + + Due to the browser security restriction on camera video streaming access, a secure HTTPS connection is required to use the library with camera. + + > For convenience, self-signed certificates can be used during development and testing. diff --git a/programming/javascript/faq/unable-to-scan-aztec-code.md b/programming/javascript/faq/unable-to-scan-aztec-code.md index ee50cfd5..7076d94e 100644 --- a/programming/javascript/faq/unable-to-scan-aztec-code.md +++ b/programming/javascript/faq/unable-to-scan-aztec-code.md @@ -9,14 +9,6 @@ needAutoGenerateSidebar: false # Why am I unable to scan an Aztec code in the helloworld sample? [<< Back to FAQ index](index.md) -# Version 10 -```javascript -let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); -settings.barcodeSettings.barcodeFormatIds = - Dynamsoft.DBR.EnumBarcodeFormat.BF_AZTEC; -await router.updateSettings("ReadSingleBarcode", settings); -await router.startCapturing("ReadSingleBarcode"); -``` ## For version 8 and version 9 diff --git a/programming/javascript/user-guide/index.md b/programming/javascript/user-guide/index.md index ed3eb149..81df591d 100644 --- a/programming/javascript/user-guide/index.md +++ b/programming/javascript/user-guide/index.md @@ -164,7 +164,7 @@ The complete code of the "Hello World" example is shown below #### About the code -- `Dynamsoft.License.LicenseManager.initLicense()`: This method initializes the license for using the SDK in the application. Note that the string "**DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9**" used in this example points to an online license that requires a network connection to work. Read more on [Specify the license](#1-specify-the-license). +- `Dynamsoft.License.LicenseManager.initLicense()`: This method initializes the license for using the SDK in the application. Note that the string "**DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9**" used in this example points to an online license that requires a network connection to work. Read more on [Specify the license](#specify-the-license). - `Dynamsoft.Core.CoreModule.loadWasm(["dbr"])`: This is an optional code. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding. @@ -181,11 +181,11 @@ The complete code of the "Hello World" example is shown below cvRouter.startCapturing("ReadSingleBarcode"); ``` - **Dispatch Results to Listening Objects** - - The processing results are returned through the [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js) interface. The `CapturedResultReceiver` object is registered to `cvRouter` via the method `addResultReceiver()`. For more information, please check out [Register a result receiver](#step-4-register-a-result-receiver). + - The processing results are returned through the [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js) interface. The `CapturedResultReceiver` object is registered to `cvRouter` via the method `addResultReceiver()`. For more information, please check out [Register a result receiver](#register-a-result-receiver). ```js cvRouter.addResultReceiver({/*The-CapturedResultReceiver-Object"*/}); ``` - - Also note that reading from video is extremely fast and there could be many duplicate results. We can use a [filter](#3-important-filter-the-results) with result deduplication enabled to filter out the duplicate results. The object is registered to `cvRouter` via the method `addResultFilter()`. + - Also note that reading from video is extremely fast and there could be many duplicate results. We can use a [filter](#filter-the-results-important) with result deduplication enabled to filter out the duplicate results. The object is registered to `cvRouter` via the method `addResultFilter()`. ```js cvRouter.addResultFilter(filter); ``` @@ -480,7 +480,7 @@ await cvRouter.updateSettings("ReadSingleBarcode", settings); await cvRouter.startCapturing("ReadSingleBarcode"); ``` -For a list of adjustable barcode settings, check out [SimplifiedBarcodeReaderSettings](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/simplified-barcode-reader-settings.html). +For a list of adjustable barcode settings, check out [SimplifiedBarcodeReaderSettings](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/simplified-barcode-reader-settings.html) and [EnumBarcodeFormat](https://www.dynamsoft.com/capture-vision/docs/core/enums/barcode-reader/barcode-format.html?lang=js&product=dbr). #### 1.2. Retrieve the original image From b40caed34db1835dc20f47b6b38df691bb0ed41a Mon Sep 17 00:00:00 2001 From: DMGithubPublisher Date: Tue, 18 Feb 2025 16:26:49 +0800 Subject: [PATCH 2/3] update to internal commit 1c6c4022 --- .../programming-javascript-v10.0.21.html | 4 -- .../programming-javascript-v10.2.1000.html | 4 -- .../programming-javascript.html | 4 -- .../faq/enable-supported-barcode-format.md | 49 ------------------- programming/javascript/faq/index.md | 5 +- programming/javascript/user-guide/index.md | 6 +-- 6 files changed, 4 insertions(+), 68 deletions(-) delete mode 100644 programming/javascript/faq/enable-supported-barcode-format.md diff --git a/_includes/sidelist-programming/programming-javascript-v10.0.21.html b/_includes/sidelist-programming/programming-javascript-v10.0.21.html index 847517ac..3a6858c0 100644 --- a/_includes/sidelist-programming/programming-javascript-v10.0.21.html +++ b/_includes/sidelist-programming/programming-javascript-v10.0.21.html @@ -1148,10 +1148,6 @@ barcodes via video in iOS 16.7 or 17? -
  • - How to Enable Specific Barcode Formats with Your License? -
  • OTHERS
  • diff --git a/_includes/sidelist-programming/programming-javascript-v10.2.1000.html b/_includes/sidelist-programming/programming-javascript-v10.2.1000.html index 9140bd94..9910d1da 100644 --- a/_includes/sidelist-programming/programming-javascript-v10.2.1000.html +++ b/_includes/sidelist-programming/programming-javascript-v10.2.1000.html @@ -1582,10 +1582,6 @@ barcodes via video in iOS 16.7 or 17? -
  • - How to Enable Specific Barcode Formats with Your License? -
  • OTHERS
  • diff --git a/_includes/sidelist-programming/programming-javascript.html b/_includes/sidelist-programming/programming-javascript.html index 0d85b561..0d1fa38d 100644 --- a/_includes/sidelist-programming/programming-javascript.html +++ b/_includes/sidelist-programming/programming-javascript.html @@ -1674,10 +1674,6 @@ >What are the system requirements for running the latest version of Dynamsoft Barcode Reader? -
  • - How to Enable Specific Barcode Formats with Your License? -
  • License Initialization
  • diff --git a/programming/javascript/faq/enable-supported-barcode-format.md b/programming/javascript/faq/enable-supported-barcode-format.md deleted file mode 100644 index 19dfde43..00000000 --- a/programming/javascript/faq/enable-supported-barcode-format.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -layout: default-layout -title: How to Enable Specific Barcode Formats with Your License? -keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, barcode format, no license found -description: When moving from a trial license to a production license, you may encounter the error `[xxx] No license found` if your enabled barcode formats don't match the formats supported by your license? -needAutoGenerateSidebar: false ---- - -# How to Enable Specific Barcode Formats with Your License -[<< Back to FAQ index](index.md) - -## Problem -When moving from a trial license to a production license, you may encounter the error `[xxx] No license found` if your enabled barcode formats don't match the formats supported by your license. This occurs because the SDK validates enabled formats against your license's capabilities. - -## Solution -Explicitly enable **only the barcode formats covered by your license** in your code configuration. - ---- - -### Step-by-Step Guide - -1. **Check Your License Coverage** - Confirm which barcode formats your license supports (e.g., QR Code + 1D barcodes). - -2. **Configure Barcode Formats** - Update your code to explicitly enable **only the licensed formats**. - - Example for Enabling **QR Code Only**: - - ```javascript - let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); - // Enable QR Code only - settings.barcodeSettings.barcodeFormatIds = - Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; - await router.updateSettings("ReadSingleBarcode", settings); - await router.startCapturing("ReadSingleBarcode"); - ``` - - - Example for Enabling **Multiple Formats**: - - Use bitwise OR (|) to combine formats. - ```javascript - // Enable QR Code and 1D - settings.barcodeSettings.barcodeFormatIds = - Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE | Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED; - ``` - -4. **Verify Supported Formats** - - View the complete list of supported barcode formats and their corresponding IDs here: [Barcode Format Documentation](https://www.dynamsoft.com/capture-vision/docs/core/enums/barcode-reader/barcode-format.html?lang=js&product=dbr) diff --git a/programming/javascript/faq/index.md b/programming/javascript/faq/index.md index 7b8b10db..dd1067c3 100644 --- a/programming/javascript/faq/index.md +++ b/programming/javascript/faq/index.md @@ -85,7 +85,4 @@ noTitleIndex: true 38. [Why isn't my webcam reading the barcode on my driver's license or ID card?](webcam-support-dense.md) -39. [What are the system requirements for running the latest version of Dynamsoft Barcode Reader?](system-requirement.md) - -40. [How to Enable Specific Barcode Formats with Your License?](enable-supported-barcode-format.md -) +39. [What are the system requirements for running the latest version of Dynamsoft Barcode Reader?](system-requirement.md) \ No newline at end of file diff --git a/programming/javascript/user-guide/index.md b/programming/javascript/user-guide/index.md index 81df591d..a0c92622 100644 --- a/programming/javascript/user-guide/index.md +++ b/programming/javascript/user-guide/index.md @@ -164,7 +164,7 @@ The complete code of the "Hello World" example is shown below #### About the code -- `Dynamsoft.License.LicenseManager.initLicense()`: This method initializes the license for using the SDK in the application. Note that the string "**DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9**" used in this example points to an online license that requires a network connection to work. Read more on [Specify the license](#specify-the-license). +- `Dynamsoft.License.LicenseManager.initLicense()`: This method initializes the license for using the SDK in the application. Note that the string "**DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9**" used in this example points to an online license that requires a network connection to work. Read more on [Specify the license](#1-specify-the-license). - `Dynamsoft.Core.CoreModule.loadWasm(["dbr"])`: This is an optional code. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding. @@ -181,11 +181,11 @@ The complete code of the "Hello World" example is shown below cvRouter.startCapturing("ReadSingleBarcode"); ``` - **Dispatch Results to Listening Objects** - - The processing results are returned through the [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js) interface. The `CapturedResultReceiver` object is registered to `cvRouter` via the method `addResultReceiver()`. For more information, please check out [Register a result receiver](#register-a-result-receiver). + - The processing results are returned through the [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js) interface. The `CapturedResultReceiver` object is registered to `cvRouter` via the method `addResultReceiver()`. For more information, please check out [Register a result receiver](#step-4-register-a-result-receiver). ```js cvRouter.addResultReceiver({/*The-CapturedResultReceiver-Object"*/}); ``` - - Also note that reading from video is extremely fast and there could be many duplicate results. We can use a [filter](#filter-the-results-important) with result deduplication enabled to filter out the duplicate results. The object is registered to `cvRouter` via the method `addResultFilter()`. + - Also note that reading from video is extremely fast and there could be many duplicate results. We can use a [filter](#3-important-filter-the-results) with result deduplication enabled to filter out the duplicate results. The object is registered to `cvRouter` via the method `addResultFilter()`. ```js cvRouter.addResultFilter(filter); ``` From 3f1435492f4561e533dc4abca51542645174a47a Mon Sep 17 00:00:00 2001 From: DMGithubPublisher Date: Tue, 18 Feb 2025 17:53:28 +0800 Subject: [PATCH 3/3] update to internal commit 3706479b --- .../programming-javascript-v10.0.21.html | 4 ++ .../programming-javascript-v10.2.1000.html | 4 ++ .../programming-javascript.html | 4 ++ .../javascript/samples-demos/index.md | 2 +- .../javascript/faq/add-remove-beep-sound.md | 4 +- ...etween-barcodeReader-and-barcodeScanner.md | 1 + ...ence-between-bestspeed-and-bestcoverage.md | 9 ++-- ...VideoSettings-and-updateRuntimeSettings.md | 14 ++++++ .../faq/enable-supported-barcode-format.md | 49 +++++++++++++++++++ programming/javascript/faq/index.md | 5 +- .../faq/read-from-existing-files.md | 13 ++++- .../javascript/faq/scan-US-drivers-license.md | 2 +- ...rver-requirements-for-dbr-js-deployment.md | 29 ----------- .../faq/unable-to-scan-aztec-code.md | 8 +++ 14 files changed, 108 insertions(+), 40 deletions(-) create mode 100644 programming/javascript/faq/enable-supported-barcode-format.md delete mode 100644 programming/javascript/faq/server-requirements-for-dbr-js-deployment.md diff --git a/_includes/sidelist-programming/programming-javascript-v10.0.21.html b/_includes/sidelist-programming/programming-javascript-v10.0.21.html index 3a6858c0..847517ac 100644 --- a/_includes/sidelist-programming/programming-javascript-v10.0.21.html +++ b/_includes/sidelist-programming/programming-javascript-v10.0.21.html @@ -1148,6 +1148,10 @@ barcodes via video in iOS 16.7 or 17? +
  • + How to Enable Specific Barcode Formats with Your License? +
  • OTHERS
  • diff --git a/_includes/sidelist-programming/programming-javascript-v10.2.1000.html b/_includes/sidelist-programming/programming-javascript-v10.2.1000.html index 9910d1da..9140bd94 100644 --- a/_includes/sidelist-programming/programming-javascript-v10.2.1000.html +++ b/_includes/sidelist-programming/programming-javascript-v10.2.1000.html @@ -1582,6 +1582,10 @@ barcodes via video in iOS 16.7 or 17? +
  • + How to Enable Specific Barcode Formats with Your License? +
  • OTHERS
  • diff --git a/_includes/sidelist-programming/programming-javascript.html b/_includes/sidelist-programming/programming-javascript.html index 0d1fa38d..0d85b561 100644 --- a/_includes/sidelist-programming/programming-javascript.html +++ b/_includes/sidelist-programming/programming-javascript.html @@ -1674,6 +1674,10 @@ >What are the system requirements for running the latest version of Dynamsoft Barcode Reader? +
  • + How to Enable Specific Barcode Formats with Your License? +
  • License Initialization
  • diff --git a/programming-old/javascript/samples-demos/index.md b/programming-old/javascript/samples-demos/index.md index b440cd86..1d554c22 100644 --- a/programming-old/javascript/samples-demos/index.md +++ b/programming-old/javascript/samples-demos/index.md @@ -27,7 +27,7 @@ permalink: /programming/javascript/samples-demos/index.html
    Read + whether on mobile or desktop." class="button title" target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/hello-world/read-an-image.html">Read an Existing Image
    - Version 9 +## Version 9 This feature is controlled using the [whenToPlaySoundforSuccessfulRead](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interface/ScanSettings.html?ver=latest) property. To enable the feature, set the property to either **frame** or **unique**. To disable the feature, set it to **never**. > This feature is disabled by default. - \ No newline at end of file diff --git a/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md b/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md index 5ab3601f..96fa3657 100644 --- a/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md +++ b/programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md @@ -9,6 +9,7 @@ needAutoGenerateSidebar: false # What is the difference between the BarcodeReader class and the BarcodeScanner class? Can they be used interchangeably? [<< Back to FAQ index](index.md) + **_NOTE:_** - This is for version 9 or lower of barcode reader sdk No, as each offers a different functionality than the other. The `BarcodeReader` class is used to decode static images (via one of the [decode\*](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/BarcodeReader.html#decode-barcodes) methods) and does not have the ability to open the camera stream and decode barcodes directly from the video stream. diff --git a/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md b/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md index 0e70a830..6dec5cc2 100644 --- a/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md +++ b/programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md @@ -10,12 +10,13 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -`speed`, as the name suggests, prioritizes time cost over the accuracy of the results, and `coverage` is vice versa. +`SpeedFirst`, as the name suggests, prioritizes time cost over the accuracy of the results, and `ReadRateFirst` is vice versa. -`balance` is the perfect middle ground between `speed` and `coverage`. +`Balance` is the perfect middle ground between `SpeedFirst` and `ReadRateFirst`. -Lastly, the `single` template is optimized for interactive video scenarios, and is the default mode when using the `BarcodeScanner` class. +Lastly, the `Single` template is optimized for interactive video scenarios, and is the default mode. + +To choose the proper template that you want the SDK to utilize and learn about some of the other templates we offer, please use the [PresetTemplate](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/preset-templates.html?product=dbr&lang=javascript). In terms of the individual settings, if you would like to learn of the exact breakdown between the different templates, please contact the [Dynamsoft support team](https://www.dynamsoft.com/contact/). -To choose the runtime settings template that you want the SDK to utilize and learn about some of the other templates we offer, please use the [updateRuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeReader.html#updateruntimesettings) method. diff --git a/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md b/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md index dac17e80..c68c087e 100644 --- a/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md +++ b/programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md @@ -10,6 +10,20 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) +## Version 10 +`updateVideoSettings` is used to update the [MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints) that define most of the video information such as width, height, and the camera facingMode (i.e. front or rear camera). + +`updateSettings` is used to update the [SimplifiedSettings](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/simplified-capture-vision-settings.html?product=dbr&lang=javascript) interface. It updates the runtime settings with a given template object. +```javascript +let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); +settings.barcodeSettings.barcodeFormatIds = + Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; +await router.updateSettings("ReadSingleBarcode", settings); +await router.startCapturing("ReadSingleBarcode"); +``` + +## Version 9 + `updateScanSettings` is used to update the [ScanSettings](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/interface/ScanSettings.html?ver=latest) interface. This can be used to configure settings such as ignoring duplicate reads, setting sound/vibration when a barcode is scanned. `updateVideoSettings` is used to update the [MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints) that define most of the video information such as width, height, and the camera facingMode (i.e. front or rear camera). diff --git a/programming/javascript/faq/enable-supported-barcode-format.md b/programming/javascript/faq/enable-supported-barcode-format.md new file mode 100644 index 00000000..19dfde43 --- /dev/null +++ b/programming/javascript/faq/enable-supported-barcode-format.md @@ -0,0 +1,49 @@ +--- +layout: default-layout +title: How to Enable Specific Barcode Formats with Your License? +keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, barcode format, no license found +description: When moving from a trial license to a production license, you may encounter the error `[xxx] No license found` if your enabled barcode formats don't match the formats supported by your license? +needAutoGenerateSidebar: false +--- + +# How to Enable Specific Barcode Formats with Your License +[<< Back to FAQ index](index.md) + +## Problem +When moving from a trial license to a production license, you may encounter the error `[xxx] No license found` if your enabled barcode formats don't match the formats supported by your license. This occurs because the SDK validates enabled formats against your license's capabilities. + +## Solution +Explicitly enable **only the barcode formats covered by your license** in your code configuration. + +--- + +### Step-by-Step Guide + +1. **Check Your License Coverage** + Confirm which barcode formats your license supports (e.g., QR Code + 1D barcodes). + +2. **Configure Barcode Formats** + Update your code to explicitly enable **only the licensed formats**. + - Example for Enabling **QR Code Only**: + + ```javascript + let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); + // Enable QR Code only + settings.barcodeSettings.barcodeFormatIds = + Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; + await router.updateSettings("ReadSingleBarcode", settings); + await router.startCapturing("ReadSingleBarcode"); + ``` + + - Example for Enabling **Multiple Formats**: + + Use bitwise OR (|) to combine formats. + ```javascript + // Enable QR Code and 1D + settings.barcodeSettings.barcodeFormatIds = + Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE | Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED; + ``` + +4. **Verify Supported Formats** + + View the complete list of supported barcode formats and their corresponding IDs here: [Barcode Format Documentation](https://www.dynamsoft.com/capture-vision/docs/core/enums/barcode-reader/barcode-format.html?lang=js&product=dbr) diff --git a/programming/javascript/faq/index.md b/programming/javascript/faq/index.md index dd1067c3..7b8b10db 100644 --- a/programming/javascript/faq/index.md +++ b/programming/javascript/faq/index.md @@ -85,4 +85,7 @@ noTitleIndex: true 38. [Why isn't my webcam reading the barcode on my driver's license or ID card?](webcam-support-dense.md) -39. [What are the system requirements for running the latest version of Dynamsoft Barcode Reader?](system-requirement.md) \ No newline at end of file +39. [What are the system requirements for running the latest version of Dynamsoft Barcode Reader?](system-requirement.md) + +40. [How to Enable Specific Barcode Formats with Your License?](enable-supported-barcode-format.md +) diff --git a/programming/javascript/faq/read-from-existing-files.md b/programming/javascript/faq/read-from-existing-files.md index 79158da7..687a7897 100644 --- a/programming/javascript/faq/read-from-existing-files.md +++ b/programming/javascript/faq/read-from-existing-files.md @@ -10,8 +10,19 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -Yes, the JavaScript SDK supports reading from a file in local memory. This can be achieved via the `BarcodeReader` class instead of the `BarcodeScanner` class. +Yes, the JavaScript SDK supports reading from a file in local memory. +## Version 10.x +```javascript +let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance(); +// Use the router to perform a job. +let results = await router.capture("blob:https://demo.dynamsoft.com/afb84bd2-e8cb-4b96-92b6-36dc89783692", "ReadSingleBarcode"); +// ... +// Release the resources after the job is finished. +router.dispose(); +``` + +## Version 9.x ```javascript let reader = await Dynamsoft.DBR.BarcodeReader.createInstance(); let results = await reader.decode(imageSource); diff --git a/programming/javascript/faq/scan-US-drivers-license.md b/programming/javascript/faq/scan-US-drivers-license.md index e96dc5ed..dbbf76c1 100644 --- a/programming/javascript/faq/scan-US-drivers-license.md +++ b/programming/javascript/faq/scan-US-drivers-license.md @@ -10,4 +10,4 @@ needAutoGenerateSidebar: false [<< Back to FAQ index](index.md) -You can scan a US driver's license to get all of these details using our SDK. The best way to do so is to follow our pre-built driver license sample for the JavaScript edition, which can be found in the [code gallery](https://www.dynamsoft.com/barcode-reader/resources/code-gallery/?SampleID=619). This sample can also be found in the `samples\4.use-case` folder of the JavaScript package download (via the Dynamsoft [free trial download](https://www.dynamsoft.com/barcode-reader/downloads)). +You can scan a US driver's license to get all of these details using our SDK. The best way to do so is to follow our pre-built driver license sample for the JavaScript edition, which can be found in the [code gallery](https://github.com/Dynamsoft/barcode-reader-javascript-demo). This sample can also be found in the `samples\4.use-case` folder of the JavaScript package download (via the Dynamsoft [free trial download](https://www.dynamsoft.com/barcode-reader/downloads)). diff --git a/programming/javascript/faq/server-requirements-for-dbr-js-deployment.md b/programming/javascript/faq/server-requirements-for-dbr-js-deployment.md deleted file mode 100644 index 2d7b0900..00000000 --- a/programming/javascript/faq/server-requirements-for-dbr-js-deployment.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: default-layout -title: What are the server requirements for Dbr JS deployment? -keywords: Dynamsoft Barcode Reader, FAQ, tech basic, server requirements, deployment -description: What are the server requirements for Dbr JS deployment? -needAutoGenerateSidebar: false ---- - -# What are the server requirements for Dbr JS deployment? - -[<< Back to FAQ index](index.md) - -To deploy DBR-JS to the server, you need to - - 1. Set the MIME type for `.wasm` as `application/wasm` on your webserver. - - The goal is to configure your server to send the correct Content-Type header for the wasm file so that it is processed correctly by the browser. - - Different types of webservers are configured differently, for example: - - + Apache - + IIS - + NGINX - - 2. Enable HTTPS - - Due to the browser security restriction on camera video streaming access, a secure HTTPS connection is required to use the library with camera. - - > For convenience, self-signed certificates can be used during development and testing. diff --git a/programming/javascript/faq/unable-to-scan-aztec-code.md b/programming/javascript/faq/unable-to-scan-aztec-code.md index 7076d94e..ee50cfd5 100644 --- a/programming/javascript/faq/unable-to-scan-aztec-code.md +++ b/programming/javascript/faq/unable-to-scan-aztec-code.md @@ -9,6 +9,14 @@ needAutoGenerateSidebar: false # Why am I unable to scan an Aztec code in the helloworld sample? [<< Back to FAQ index](index.md) +# Version 10 +```javascript +let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); +settings.barcodeSettings.barcodeFormatIds = + Dynamsoft.DBR.EnumBarcodeFormat.BF_AZTEC; +await router.updateSettings("ReadSingleBarcode", settings); +await router.startCapturing("ReadSingleBarcode"); +``` ## For version 8 and version 9