Skip to content

Commit 1a08e5d

Browse files
Merge branch 'preview' of https://github.com/dynamsoft-docs/capture-vision-docs-js into preview
2 parents 03e28d1 + 7aeb031 commit 1a08e5d

File tree

7 files changed

+111
-5
lines changed

7 files changed

+111
-5
lines changed

programming/javascript/api-reference/capture-vision-router/interfaces/captured-result.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default-layout
33
title: Interface CapturedResult - Dynamsoft Capture Vision Router Module JS Edition API Reference
44
description: This page shows the JS edition of the interface CapturedResult in Dynamsoft Capture Vision Router Module.
5-
keywords: captured result, JS
5+
keywords: captured result, JS, capture vision
66
needAutoGenerateSidebar: true
77
needGenerateH3Content: true
88
noTitleIndex: true
@@ -49,4 +49,4 @@ An array of [ProcessedDocumentResultItem]({{ site.ddn_js_api }}interfaces/proces
4949

5050
## parsedResultItems
5151

52-
An array of [ParsedResultItem]({{ site.dcp_js_api }}interfaces/parsed-result-item.html) objects representing the parsed result items.
52+
An array of [ParsedResultItem]({{ site.dcp_js_api }}interfaces/parsed-result-item.html) objects representing the parsed result items.

programming/javascript/api-reference/capture-vision-router/multiple-image-processing.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ resultReceiver.onCapturedResultReceived = (result) => {
236236
router.addResultReceiver(resultReceiver);
237237
```
238238

239+
**See also**
240+
241+
[CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/captured-result-receiver.html)
242+
239243
## removeResultReceiver
240244

241245
Removes the specified `CapturedResultReceiver` object.
@@ -267,6 +271,10 @@ router.addResultReceiver(resultReceiver);
267271
router.removeResultReceiver(resultReceiver);
268272
```
269273

274+
**See also**
275+
276+
[CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/captured-result-receiver.html)
277+
270278
## addResultFilter
271279

272280
Adds a `MultiFrameResultCrossFilter` object to filter non-essential results.
@@ -297,7 +305,7 @@ router.addResultFilter(filter);
297305
298306
**See also**
299307

300-
[MultiFrameResultCrossFilter](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/utility/multi-frame-result-cross-filter.html?product=ddn&repoType=web)
308+
[MultiFrameResultCrossFilter](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/utility/multi-frame-result-cross-filter.html)
301309

302310
## removeResultFilter
303311

@@ -412,4 +420,4 @@ await router.switchCapturingTemplate("ReadBarcodes_ReadRateFirst");
412420

413421
**Remarks**
414422

415-
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.2000.
423+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.2000.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: default-layout
3+
title: How can I prevent my browser from freezing or showing a grey screen when I switch between apps and return to it?
4+
keywords: Dynamsoft Barcode Reader, FAQ, tech basic, frozen screen, grey screen
5+
description: How can I prevent my browser from freezing or showing a grey screen when I switch between apps and return to it?
6+
needAutoGenerateSidebar: false
7+
---
8+
9+
# How can I prevent my browser from freezing or showing a grey screen when I switch between apps and return to it?
10+
11+
[<< Back to FAQ index](index.md)
12+
13+
When using the camerenhancer sdk, you may encounter an issue where switching to another app and then returning to the browser results in a frozen or grey screen. To address this, utilize a workaround in the form of the following code snippet:
14+
15+
```javascript
16+
window.addEventListener("visibilitychange", () => {
17+
if (document.visibilityState === "hidden") {
18+
if (router && cameraEnhancer) {
19+
router.stopCapturing().then(() => {
20+
cameraEnhancer.close();
21+
});
22+
}
23+
} else if (document.visibilityState === "visible") {
24+
if (router && cameraEnhancer) {
25+
cameraEnhancer.open().then(status => {
26+
router.startCapturing("DetectDocumentBoundaries_Default");
27+
});
28+
}
29+
}
30+
});
31+
```
32+
33+
This code essentially closes the camera and releases associated resources when the user exits the browser. It then reopens the camera when the user returns to the browser, ensuring a smoother experience.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default-layout
3+
title: JavaScript - Dynamsoft Capture Vision FAQ
4+
keywords: faq, javascript, dcv
5+
description: Dynamsoft Capture Vision FAQ - JavaScript
6+
needAutoGenerateSidebar: false
7+
permalink: /faq/index.html
8+
9+
---
10+
11+
# FAQ - JavaScript
12+
13+
1. [How can I prevent my browser from freezing or showing a grey screen when I switch between apps and return to it?](app-switching-issue.html)
14+
15+
2. [Why am I encountering errors like "r.taskSet.intermediateResultUnits is not iterable" when using frameworks like React or Angular with Dynamsoft packages?](version-mismatch.html)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: default-layout
3+
title: Why am I encountering errors like "r.taskSet.intermediateResultUnits is not iterable" when using frameworks like React or Angular with Dynamsoft packages?
4+
keywords: Dynamsoft Capture Vision, FAQ, version, mismatch, taskset
5+
description: Why am I encountering errors like "r.taskSet.intermediateResultUnits is not iterable" when using frameworks like React or Angular with Dynamsoft packages?
6+
needAutoGenerateSidebar: false
7+
---
8+
9+
# Why am I encountering errors like "r.taskSet.intermediateResultUnits is not iterable" when using frameworks like React or Angular with Dynamsoft packages?
10+
11+
[<< Back to FAQ index](index.md)
12+
13+
Topic: Resolving Version Mismatch Issues in Dynamsoft Packages
14+
15+
Resolution:
16+
17+
When using a framework like React or Angular with Dynamsoft packages, it's crucial to ensure that the version number of each Dynamsoft package listed in the `package.json` file matches the version number defined in the `engineResourcePaths` generally found defined in the cvr.ts file if you have followed the samples for developement.
18+
19+
In the `engineResourcePaths` configuration, make sure to include the correct version numbers for each Dynamsoft package mentioned in `package.json`. Here's an example of how to define the engineResourcePaths with the correct version numbers:
20+
21+
```javascript
22+
Dynamsoft.Core.CoreModule.engineResourcePaths = {
23+
std: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std@<std_version>/dist/",
24+
dip: "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing@<dip_version>/dist/",
25+
core: "https://cdn.jsdelivr.net/npm/dynamsoft-core@<core_version>/dist/",
26+
license: "https://cdn.jsdelivr.net/npm/dynamsoft-license@<license_version>/dist/",
27+
cvr: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@<cvr_version>/dist/",
28+
dbr: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@<dbr_version>/dist/",
29+
dce: "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@<dce_version>/dist/"
30+
};
31+
```
32+
Replace <std_version>, <dip_version>, <core_version>, <license_version>, <cvr_version>, <dbr_version>, and <dce_version> with the appropriate version numbers corresponding to each Dynamsoft package.
33+
34+
```javascript
35+
//some lines from package.json
36+
"dependencies": {
37+
...
38+
"dynamsoft-barcode-reader": "<dbr_version>",
39+
"dynamsoft-camera-enhancer": "<dce_version>",
40+
"dynamsoft-capture-vision-router": "<cvr_version>",
41+
"dynamsoft-core": "<core_version>",
42+
"dynamsoft-license": "<license_version>",
43+
"dynamsoft-utility": "<utility_version>",
44+
}
45+
```
46+
47+
By following these steps and maintaining consistency in version numbers between `package.json` and `engineResourcePaths`, you can mitigate version mismatch errors and ensure the proper functioning of Dynamsoft packages within your framework-based application.

programming/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ This documentation assumes familiarity with the [Architecture of Dynamsoft Captu
5959

6060
## Contact Us
6161

62-
Feel free to <a href = "https://www.dynamsoft.com/company/customer-service/#contact" target = "_blank">contact us</a> if you have any questions.
62+
Feel free to <a href = "https://www.dynamsoft.com/company/customer-service/#contact" target = "_blank">contact us</a> if you have any questions.

programming/javascript/user-guide/mrz-scanner.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ keywords: JavaScript, scan mrz, read mrz, scan passport, read passport, scan id
66
needAutoGenerateSidebar: true
77
needGenerateH3Content: true
88
noTitleIndex: true
9+
ignore: true
910
---
1011

1112
# MRZ Scanner Solution for Your Website - User Guide
@@ -169,6 +170,8 @@ Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMD
169170

170171
The key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" used in this solution (found in the js/init.js file) is a test license valid for 24 hours for any newly authorized browser. If you wish to test the SDK further, you can request a 30-day free trial license through the <a href="https://www.dynamsoft.com/customer/license/trialLicense?product=mrz&utm_source=docs&package=js" target="_blank">Request a Trial License</a> link.
171172

173+
If you have already requested a trial license, please check your email for a message with the subject line "Your MRZ Scanner trial licenses."
174+
172175
#### Load resources in advance
173176

174177
To optimize image processing in a web environment, the algorithms are compiled into WebAssembly modules (files with a .wasm extension). These modules can be quite large, but the SDK can preload them asynchronously to enhance the user experience. For better performance, we recommend using [`loadWasm()`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/core-module-class.html#loadwasm) to preload the necessary libraries. Since this solution uses DCE, DLR, and DCP, only the relevant resources need to be preloaded (no need to preload .wasm resources for DCE).

0 commit comments

Comments
 (0)