Skip to content

Commit 630ded5

Browse files
authored
Merge pull request #408 from yqz5625/main
Fix FAQ
2 parents 30d207b + 9646601 commit 630ded5

8 files changed

+42
-38
lines changed

programming/javascript/faq/add-remove-beep-sound.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ Dynamsoft.DCE.Feedback.beep();
1919
**_NOTE:_** - Check the class [Feedback](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/feedback.html#beep) for more details.
2020

2121

22-
<details>
23-
<summary><b> Version 9</b></summary>
22+
## Version 9
2423
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**.
2524

2625
> This feature is disabled by default.
27-
</details>

programming/javascript/faq/difference-between-barcodeReader-and-barcodeScanner.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ needAutoGenerateSidebar: false
99
# What is the difference between the BarcodeReader class and the BarcodeScanner class? Can they be used interchangeably?
1010

1111
[<< Back to FAQ index](index.md)
12+
1213
**_NOTE:_** - This is for version 9 or lower of barcode reader sdk
1314
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.
1415

programming/javascript/faq/difference-between-bestspeed-and-bestcoverage.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ needAutoGenerateSidebar: false
1010

1111
[<< Back to FAQ index](index.md)
1212

13-
`speed`, as the name suggests, prioritizes time cost over the accuracy of the results, and `coverage` is vice versa.
13+
`SpeedFirst`, as the name suggests, prioritizes time cost over the accuracy of the results, and `ReadRateFirst` is vice versa.
1414

15-
`balance` is the perfect middle ground between `speed` and `coverage`.
15+
`Balance` is the perfect middle ground between `SpeedFirst` and `ReadRateFirst`.
1616

17-
Lastly, the `single` template is optimized for interactive video scenarios, and is the default mode when using the `BarcodeScanner` class.
17+
Lastly, the `Single` template is optimized for interactive video scenarios, and is the default mode.
18+
19+
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).
1820

1921
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/).
2022

21-
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.

programming/javascript/faq/differences-between-updateScanSettings-updateVideoSettings-and-updateRuntimeSettings.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ needAutoGenerateSidebar: false
1010

1111
[<< Back to FAQ index](index.md)
1212

13+
## Version 10
14+
`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).
15+
16+
`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.
17+
```javascript
18+
let settings = await router.getSimplifiedSettings("ReadSingleBarcode");
19+
settings.barcodeSettings.barcodeFormatIds =
20+
Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE;
21+
await router.updateSettings("ReadSingleBarcode", settings);
22+
await router.startCapturing("ReadSingleBarcode");
23+
```
24+
25+
## Version 9
26+
1327
`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.
1428

1529
`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).

programming/javascript/faq/read-from-existing-files.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@ needAutoGenerateSidebar: false
1010

1111
[<< Back to FAQ index](index.md)
1212

13-
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.
13+
Yes, the JavaScript SDK supports reading from a file in local memory.
1414

15+
## Version 10.x
16+
```javascript
17+
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
18+
// Use the router to perform a job.
19+
let results = await router.capture("blob:https://demo.dynamsoft.com/afb84bd2-e8cb-4b96-92b6-36dc89783692", "ReadSingleBarcode");
20+
// ...
21+
// Release the resources after the job is finished.
22+
router.dispose();
23+
```
24+
25+
## Version 9.x
1526
```javascript
1627
let reader = await Dynamsoft.DBR.BarcodeReader.createInstance();
1728
let results = await reader.decode(imageSource);

programming/javascript/faq/scan-US-drivers-license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ needAutoGenerateSidebar: false
1010

1111
[<< Back to FAQ index](index.md)
1212

13-
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)).
13+
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)).

programming/javascript/faq/server-requirements-for-dbr-js-deployment.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

programming/javascript/faq/unable-to-scan-aztec-code.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ needAutoGenerateSidebar: false
99
# Why am I unable to scan an Aztec code in the helloworld sample?
1010

1111
[<< Back to FAQ index](index.md)
12+
# Version 10
13+
```javascript
14+
let settings = await router.getSimplifiedSettings("ReadSingleBarcode");
15+
settings.barcodeSettings.barcodeFormatIds =
16+
Dynamsoft.DBR.EnumBarcodeFormat.BF_AZTEC;
17+
await router.updateSettings("ReadSingleBarcode", settings);
18+
await router.startCapturing("ReadSingleBarcode");
19+
```
1220

1321
## For version 8 and version 9
1422

0 commit comments

Comments
 (0)