Skip to content

Commit 4196566

Browse files
authored
Merge pull request #394 from yqz5625/main
added Faq
2 parents f70f4d0 + 3813dd6 commit 4196566

24 files changed

+211
-67
lines changed

programming/javascript/faq/How-to-use-initSettings-getSimplifiedSettings-updateSettings.md

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

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

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

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

13+
## Version 10
14+
This feature is controlled by the `Dynamsoft Camera Enhancer` module.
15+
16+
```javascript
17+
Dynamsoft.DCE.Feedback.beep();
18+
```
19+
**_NOTE:_** - Check the class [Feedback](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/feedback.html#beep) for more details.
20+
21+
22+
<details>
23+
<summary><b> Version 9</b></summary>
1324
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**.
1425

1526
> This feature is disabled by default.
27+
</details>
42.8 KB
Loading

programming/javascript/faq/avoid-incorrect-barcode-results.md

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

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

13+
## Version 10
14+
- One method is to raise the value of [minResultConfidence](../api-reference/interfaces/simplified-barcode-reader-settings.md) of the `SimplifiedCaptureVisionSettings` interface of the capture vision router module. It is set to `30` by default.
15+
16+
- If the issue has to do with the length of the text result, you can try setting a minimum length for the barcode text(s) that are returned by the SDK. By setting the [minBarcodeTextLength](../api-reference/interfaces/simplified-barcode-reader-settings.md) property of the `SimplifiedCaptureVisionSettings` interface of the capture vision router module, the SDK can ignore results that are consistently coming out shorter than expected. It is set to `0` by default.
17+
18+
```javascript
19+
let settings = await router.getSimplifiedSettings('ReadSingleBarcode');
20+
settings.barcodeSettings.minResultConfidence = 40; //setting confidence
21+
settings.barcodeSettings.minBarcodeTextLength = 5; //setting barcodeTextLength
22+
await router.updateSettings('ReadSingleBarcode', settings);
23+
```
24+
25+
## Version 9
1326
- One method is to raise the value of [minResultConfidence](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interface/RuntimeSettings.html#minresultconfidence) of the `RuntimeSettings` to a value of 50 or higher. It is set to 30 by default.
1427
- If the issue has to do with the length of the text result, you can try setting a minimum length for the barcode text(s) that are returned by the SDK. By setting the [minBarcodeTextLength](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interface/RuntimeSettings.html#minbarcodetextlength) property of the `RuntimeSettings`, the SDK can ignore results that are consistently coming out shorter than expected.

programming/javascript/faq/call-loadWasm-proactively.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,15 @@ needAutoGenerateSidebar: false
1010

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

13+
## Version 10
14+
Preload `BarcodeReader` or other specified module proactively to save time on the initial decoding by skipping the module loading at the time of instance creation.
15+
16+
```javascript
17+
await Dynamsoft.Core.CoreModule.loadWasm(["cvr", "dbr"]);
18+
if(Dynamsoft.Core.CoreModule.isModuleLoaded("cvr")){
19+
console.log("cvr module is loaded!").
20+
}
21+
```
22+
23+
## Version 9
1324
No, the method is internally called when `createInstance` is called so there is no need to explicitly call it. However, if you would like to save some time during the instance creation, you can choose to manually call the method as soon as the page is loaded rather than letting it load on the instance creation. This can help avoid unnecessary waiting time when the library is invoked.

programming/javascript/faq/check-camera.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ needAutoGenerateSidebar: false
1010

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

13-
Starting from version 9.6.10+, you can utilize the [testCameraAccess](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/BarcodeScanner.html#testcameraaccess) method to check the camera status programmatically.
13+
## version 10 or recent
14+
In version 10, use the `dynamsoft camera enhancer` to utilize the [testCameraAccess](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/camera-control.html#testCameraAccess) method to check the camera status programmatically.
1415

15-
For versions older than 9.6.10, you can check the status using a try-catch block as shown below:
16+
17+
## version 9.6.10 till version 10
18+
you can utilize the [testCameraAccess](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/BarcodeScanner.html#testcameraaccess) method to check the camera status programmatically.
19+
20+
## version older than 9.6.10
21+
you can check the status using a try-catch block as shown below:
1622

1723
```javascript
1824
try {

programming/javascript/faq/check-current-version.md

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

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

13+
## For version 10
14+
- Check the version of Barcode Reader module
15+
```javascript
16+
Dynamsoft.DBR.BarcodeReaderModule.getVersion()
17+
```
18+
- If you are using the library via npm or yarn, then you can check the version of the package via
19+
```bash
20+
npm show dynamsoft-barcode-reader version
21+
```
22+
- If you are including the library via the CDN link, then the version number should be mentioned in that reference link.
23+
24+
25+
## For version 9
1326
There are multiple ways to check the version currently being used -
1427

1528
- The first way is to use the [version API](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/InitializationControl.html?ver=latest#version). Using this API in the browser console should print out the version of the library being used by the web app.

programming/javascript/faq/delay-when-open-camera.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,37 @@ needAutoGenerateSidebar: false
1010

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

13+
## Version 10
14+
### 1. Invoke loadWasm
15+
Preload `BarcodeReader` or other specified module proactively to save time on the initial decoding by skipping the module loading at the time of instance creation.
1316

14-
## 1. Invoke loadWasm in advance
17+
```javascript
18+
await Dynamsoft.Core.CoreModule.loadWasm(["DBR"]);
19+
```
20+
### 2. skip camera inspection
21+
You can bypass the camera selection[ifSkipCameraInspection](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/camera-control.html#ifskipcamerainspection)
22+
```javascript
23+
cameraEnhancer.ifSkipCameraInspection
24+
```
25+
26+
### 3. Pre-open camera in advance
27+
Run the following code before calling `createInstance`.
28+
```
29+
navigator.mediaDevices.getUserMedia({video: true}).then(mediaStream=>{
30+
mediaStream.getTracks().forEach((track) => {
31+
track.stop();
32+
});
33+
}, err=>{});
34+
```
35+
36+
## Version 9
37+
### 1. Invoke loadWasm in advance
1538

1639
```javascript
1740
Dynamsoft.DBR.BarcodeReader.loadWasm();
1841
```
1942

20-
## 2. Pre-open the camera in advance
43+
### 2. Pre-open the camera in advance
2144

2245
Run the following code before calling `createInstance`.
2346
```
@@ -28,7 +51,7 @@ navigator.mediaDevices.getUserMedia({video: true}).then(mediaStream=>{
2851
}, err=>{});
2952
```
3053

31-
## 3. Skip Camera inspection(use default camera)
54+
### 3. Skip Camera inspection(use default camera)
3255

3356
```javascript
3457
scanner.ifSkipCameraInspection = true;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +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-
12+
**_NOTE:_** - This is for version 9 or lower of barcode reader sdk
1313
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.
1414

1515
The `BarcodeScanner` class on the other hand has the ability to decode barcodes directly from a video input, but it can also capture a still image using the camera when `singleFrameMode` is toggled.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: default-layout
3+
title: What are the differences between updateScanSettings/updateVideoSettings/updateRuntimeSettings?
4+
keywords: Dynamsoft Barcode Reader, FAQ, tech basic, updateScanSettings, updateVideoSettings, updateRuntimeSettings
5+
description: What are the differences between updateScanSettings/updateVideoSettings/updateRuntimeSettings?
6+
needAutoGenerateSidebar: false
7+
---
8+
9+
# What are the differences between updateScanSettings/updateVideoSettings/updateRuntimeSettings ?
10+
11+
[<< Back to FAQ index](index.md)
12+
13+
`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.
14+
15+
`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).
16+
17+
`updateRuntimeSettings` is used to update the [RuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/interface/RuntimeSettings.html?ver=latest) interface. It updates the runtime settings with a given object or use the string `speed`, `balance`, or `coverage` to use [our preset settings for BarcodeScanner](https://www.dynamsoft.com/barcode-reader/parameters/structure-and-interfaces-of-parameters.html?ver=latest#using-runtime-settings-templates). The default setting is `speed`.

0 commit comments

Comments
 (0)