Skip to content

Commit 8ec85d8

Browse files
update to internal commit ae4cb82a
1 parent 7ff44c5 commit 8ec85d8

10 files changed

+43
-47
lines changed

programming-old/javascript/samples-demos/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ permalink: /programming/javascript/samples-demos/index.html
2727
</div>
2828
<div class="file"><a data-balloon-length="xlarge" data-balloon-pos="down" aria-label="Decode barcodes
2929
using images that are stored locally,
30-
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
30+
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
3131
an Existing Image</a></div>
3232
<div class="file"><a data-balloon-length="xlarge" data-balloon-pos="down" aria-label="Decode video stream in an Angular
3333
Application from a USB-connected or built-in camera (mobile or desktop)." class="button title"

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ 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-
## Version 9
22+
<details>
23+
<summary><b> Version 9</b></summary>
2324
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**.
2425

2526
> This feature is disabled by default.
27+
</details>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ 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-
1312
**_NOTE:_** - This is for version 9 or lower of barcode reader sdk
1413
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.
1514

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

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

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

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

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

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

2119
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/).
2220

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: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@ 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-
2713
`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.
2814

2915
`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: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@ needAutoGenerateSidebar: false
1010

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

13-
Yes, the JavaScript SDK supports reading from a file in local memory.
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.
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
2615
```javascript
2716
let reader = await Dynamsoft.DBR.BarcodeReader.createInstance();
2817
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://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)).
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)).
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: default-layout
3+
title: What are the server requirements for Dbr JS deployment?
4+
keywords: Dynamsoft Barcode Reader, FAQ, tech basic, server requirements, deployment
5+
description: What are the server requirements for Dbr JS deployment?
6+
needAutoGenerateSidebar: false
7+
---
8+
9+
# What are the server requirements for Dbr JS deployment?
10+
11+
[<< Back to FAQ index](index.md)
12+
13+
To deploy DBR-JS to the server, you need to
14+
15+
1. Set the MIME type for `.wasm` as `application/wasm` on your webserver.
16+
17+
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.
18+
19+
Different types of webservers are configured differently, for example:
20+
21+
+ <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess#media_types_and_character_encodings" title="Apache">Apache</a>
22+
+ <a target="_blank" href="https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap" title="IIS">IIS</a>
23+
+ <a target="_blank" href="https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types" title="NGINX">NGINX</a>
24+
25+
2. Enable HTTPS
26+
27+
Due to the browser <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts" title="security restriction">security restriction</a> on camera video streaming access, a secure HTTPS connection is required to use the library with camera.
28+
29+
> For convenience, self-signed certificates can be used during development and testing.

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ 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-
```
2012

2113
## For version 8 and version 9
2214

programming/javascript/user-guide/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ The complete code of the "Hello World" example is shown below
164164
165165
#### About the code
166166
167-
- `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).
167+
- `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).
168168
169169
- `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.
170170
@@ -181,11 +181,11 @@ The complete code of the "Hello World" example is shown below
181181
cvRouter.startCapturing("ReadSingleBarcode");
182182
```
183183
- **Dispatch Results to Listening Objects**
184-
- 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).
184+
- 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).
185185
```js
186186
cvRouter.addResultReceiver({/*The-CapturedResultReceiver-Object"*/});
187187
```
188-
- 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()`.
188+
- 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()`.
189189
```js
190190
cvRouter.addResultFilter(filter);
191191
```
@@ -480,7 +480,7 @@ await cvRouter.updateSettings("ReadSingleBarcode", settings);
480480
await cvRouter.startCapturing("ReadSingleBarcode");
481481
```
482482
483-
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).
483+
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).
484484
485485
#### 1.2. Retrieve the original image
486486

0 commit comments

Comments
 (0)