dynamsoft-barcode-reader-bundle 11.4.2001-beta-202604231927 → 11.4.2001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.html +46 -45
- package/README.md +12 -12
- package/dist/dbr.bundle.esm.js +2 -2
- package/dist/dbr.bundle.js +2 -2
- package/dist/dbr.bundle.mjs +2 -2
- package/dist/dbr.bundle.worker.js +2 -2
- package/package.json +2 -28
- package/samples.url +1 -1
package/README.html
CHANGED
|
@@ -229,41 +229,42 @@
|
|
|
229
229
|

|
|
230
230
|
 -->
|
|
231
231
|
<p>In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website.</p>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
232
|
+
<p><span style="font-size:20px">Table of Contents</span></p>
|
|
233
|
+
<ul>
|
|
234
|
+
<li><a href="#barcode-reader-for-your-website---foundational-api-guide">Barcode Reader for Your Website - Foundational API Guide</a></li>
|
|
235
|
+
<li><a href="#hello-world---simplest-implementation">Hello World - Simplest Implementation</a><ul>
|
|
236
|
+
<li><a href="#understand-the-code">Understand the code</a></li>
|
|
237
|
+
<li><a href="#about-the-code">About the code</a></li>
|
|
238
|
+
<li><a href="#run-the-example">Run the example</a></li></ul></li>
|
|
239
|
+
<li><a href="#preparing-the-sdk">Preparing the SDK</a><ul>
|
|
240
|
+
<li><a href="#step-1-include-the-sdk">Step 1: Include the SDK</a></li>
|
|
241
|
+
<li><a href="#step-2-prepare-the-sdk">Step 2: Prepare the SDK</a></li>
|
|
242
|
+
<li><a href="#1-specify-the-license">1. Specify the license</a></li>
|
|
243
|
+
<li><a href="#2-optional-specify-the-location-of-the-engine-files">2. [Optional] Specify the location of the "engine" files</a></li></ul></li>
|
|
244
|
+
<li><a href="#using-the-sdk">Using the SDK</a><ul>
|
|
245
|
+
<li><a href="#step-1-preload-the-module">Step 1: Preload the module</a></li>
|
|
246
|
+
<li><a href="#step-2-create-a-capturevisionrouter-object">Step 2: Create a CaptureVisionRouter object</a></li>
|
|
247
|
+
<li><a href="#step-3-connect-an-image-source">Step 3: Connect an image source</a></li>
|
|
248
|
+
<li><a href="#step-4-register-a-result-receiver">Step 4: Register a result receiver</a></li>
|
|
249
|
+
<li><a href="#step-5-start-process-video-frames">Step 5: Start process video frames</a></li></ul></li>
|
|
250
|
+
<li><a href="#customizing-the-process">Customizing the process</a><ul>
|
|
251
|
+
<li><a href="#1-adjust-the-preset-template-settings">1. Adjust the preset template settings</a></li>
|
|
252
|
+
<li><a href="#11-change-barcode-settings">1.1. Change barcode settings</a></li>
|
|
253
|
+
<li><a href="#12-retrieve-the-original-image">1.2. Retrieve the original image</a></li>
|
|
254
|
+
<li><a href="#13-change-reading-frequency-to-save-power">1.3. Change reading frequency to save power</a></li>
|
|
255
|
+
<li><a href="#14-specify-a-scan-region">1.4. Specify a scan region</a></li>
|
|
256
|
+
<li><a href="#2-edit-the-preset-templates-directly">2. Edit the preset templates directly</a></li>
|
|
257
|
+
<li><a href="#3-important-filter-the-results">3. [Important] Filter the results</a></li>
|
|
258
|
+
<li><a href="#method-1-verify-results-across-multiple-frames">Method 1: Verify results across multiple frames</a></li>
|
|
259
|
+
<li><a href="#method-2-eliminate-redundant-results-detected-within-a-short-time-frame">Method 2: Eliminate redundant results detected within a short time frame</a></li>
|
|
260
|
+
<li><a href="#4-add-feedback">4. Add feedback</a></li></ul></li>
|
|
261
|
+
<li><a href="#customizing-the-ui">Customizing the UI</a></li>
|
|
262
|
+
<li><a href="#documentation">Documentation</a><ul>
|
|
263
|
+
<li><a href="#api-reference">API Reference</a></li>
|
|
264
|
+
<li><a href="#how-to-upgrade">How to Upgrade</a></li>
|
|
265
|
+
<li><a href="#release-notes">Release Notes</a></li></ul></li>
|
|
266
|
+
<li><a href="#next-steps">Next Steps</a></li>
|
|
267
|
+
</ul>
|
|
267
268
|
<h2 id="hello-world---simplest-implementation">Hello World - Simplest Implementation</h2>
|
|
268
269
|
<p>Let's start with the "Hello World" example of the DBR-JS SDK which demonstrates how to use the minimum code to enable a web page to read barcodes from a live video stream. </p>
|
|
269
270
|
<p><strong>Basic Requirements</strong></p>
|
|
@@ -282,7 +283,7 @@
|
|
|
282
283
|
<span class="hljs-tag"><<span class="hljs-name">body</span>></span>
|
|
283
284
|
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"camera-view-container"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 100%; height: 60vh"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
284
285
|
<span class="hljs-tag"><<span class="hljs-name">textarea</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"results"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto"</span> <span class="hljs-attr">disabled</span>></span><span class="hljs-tag"></<span class="hljs-name">textarea</span>></span>
|
|
285
|
-
<span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.
|
|
286
|
+
<span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
|
286
287
|
<span class="hljs-tag"><<span class="hljs-name">script</span>></span><span class="javascript">
|
|
287
288
|
Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"</span>);
|
|
288
289
|
Dynamsoft.Core.CoreModule.loadWasm();
|
|
@@ -390,24 +391,24 @@ cvRouter.addResultFilter(filter);
|
|
|
390
391
|
<ul>
|
|
391
392
|
<li>jsDelivr</li>
|
|
392
393
|
</ul>
|
|
393
|
-
<pre><code class="hljs html language-html"> <span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.
|
|
394
|
+
<pre><code class="hljs html language-html"> <span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
|
394
395
|
</code></pre>
|
|
395
396
|
<ul>
|
|
396
397
|
<li>UNPKG</li>
|
|
397
398
|
</ul>
|
|
398
|
-
<pre><code class="hljs html language-html"> <span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/dynamsoft-barcode-reader-bundle@11.4.
|
|
399
|
+
<pre><code class="hljs html language-html"> <span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
|
399
400
|
</code></pre>
|
|
400
401
|
<!-- - In some rare cases (such as some restricted areas), you might not be able to access the CDN. If this happens, you can use the following files for the test.
|
|
401
|
-
<pre><code class="hljs html language-html"> <span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.4.
|
|
402
|
+
<pre><code class="hljs html language-html"> <span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
|
402
403
|
</code></pre>
|
|
403
404
|
|
|
404
405
|
However, please **DO NOT** use `download2.dynamsoft.com` resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself. -->
|
|
405
406
|
<ul>
|
|
406
407
|
<li>In frameworks like React, Vue and Angular, you may want to add the package as a dependency.</li>
|
|
407
408
|
</ul>
|
|
408
|
-
<pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.4.
|
|
409
|
+
<pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.4.2001 -E
|
|
409
410
|
<span class="hljs-comment"># or</span>
|
|
410
|
-
yarn add dynamsoft-barcode-reader-bundle@11.4.
|
|
411
|
+
yarn add dynamsoft-barcode-reader-bundle@11.4.2001 -E
|
|
411
412
|
</code></pre>
|
|
412
413
|
<p>NOTE that in frameworks, you need to <a href="#2-optional-specify-the-location-of-the-engine-files">specify the location of the engine files</a>.</p>
|
|
413
414
|
<div class="multi-panel-end"></div>
|
|
@@ -420,14 +421,14 @@ cvRouter.addResultFilter(filter);
|
|
|
420
421
|
<p>The resources are located at path <code>dynamsoft/distributables/<pkg>@<version></code>.</p></li>
|
|
421
422
|
<li><p>From npm</p></li>
|
|
422
423
|
</ul>
|
|
423
|
-
<pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.4.
|
|
424
|
+
<pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.4.2001 -E
|
|
424
425
|
</code></pre>
|
|
425
426
|
<p>The resources are located at the path <code>node_modules/<pkg></code>, without <code>@<version></code>. You must copy "dynamsoft-xxx" packages elsewhere and add <code>@<version></code>. The <code><version></code> can be obtained from <code>package.json</code> of each package. Another thing to do is to <a href="#2-optional-specify-the-location-of-the-engine-files">specify the engineResourcePaths</a> so that the SDK can correctly locate the resources.</p>
|
|
426
427
|
<blockquote>
|
|
427
428
|
<p>Since "node<em>modules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "node</em>modules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting.</p>
|
|
428
429
|
</blockquote>
|
|
429
430
|
<p>You can typically include SDK like this:</p>
|
|
430
|
-
<pre><code class="hljs html language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"path/to/dynamsoft-barcode-reader-bundle@11.4.
|
|
431
|
+
<pre><code class="hljs html language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"path/to/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
|
431
432
|
</code></pre>
|
|
432
433
|
<div class="multi-panel-end"></div>
|
|
433
434
|
<div class="multi-panel-switching-end"></div>
|
|
@@ -693,7 +694,7 @@ settings.timeout = <span class="hljs-number">500</span>;
|
|
|
693
694
|
<h3 id="2-edit-the-preset-templates-directly">2. Edit the preset templates directly</h3>
|
|
694
695
|
<p>The preset templates have many more settings that can be customized to suit your use case best. If you <a href="https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/">download the SDK from Dynamsoft website</a>, you can find the templates under</p>
|
|
695
696
|
<ul>
|
|
696
|
-
<li>"/dynamsoft-barcode-reader-js-11.4.
|
|
697
|
+
<li>"/dynamsoft-barcode-reader-js-11.4.2001/dist/templates/"</li>
|
|
697
698
|
</ul>
|
|
698
699
|
<p>Upon completing the template editing, you can invoke the <code>initSettings</code> method and provide it with the template path as an argument.</p>
|
|
699
700
|
<pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">await</span> cvRouter.initSettings(<span class="hljs-string">"PATH-TO-THE-FILE"</span>); <span class="hljs-comment">// E.g. "https://your-website/ReadSingleBarcode.json")</span>
|
|
@@ -767,7 +768,7 @@ uiElement.querySelector(<span class="hljs-string">'.dce-sel-resolution'
|
|
|
767
768
|
<h2 id="documentation">Documentation</h2>
|
|
768
769
|
<h3 id="api-reference">API Reference</h3>
|
|
769
770
|
<p>You can check out the detailed documentation about the APIs of the SDK at<br />
|
|
770
|
-
<a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.
|
|
771
|
+
<a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2001">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2001</a>.</p>
|
|
771
772
|
<!-- Compatibility is basically not an issue. Pls remove to another place
|
|
772
773
|
|
|
773
774
|
## System Requirements
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
<span style="font-size:20px">Table of Contents</span>
|
|
16
16
|
|
|
17
17
|
- [Barcode Reader for Your Website - Foundational API Guide](#barcode-reader-for-your-website---foundational-api-guide)
|
|
18
18
|
- [Hello World - Simplest Implementation](#hello-world---simplest-implementation)
|
|
@@ -46,7 +46,7 @@ In this guide, you will learn step by step on how to integrate the DBR-JS SDK in
|
|
|
46
46
|
- [API Reference](#api-reference)
|
|
47
47
|
- [How to Upgrade](#how-to-upgrade)
|
|
48
48
|
- [Release Notes](#release-notes)
|
|
49
|
-
- [Next Steps](#next-steps)
|
|
49
|
+
- [Next Steps](#next-steps)
|
|
50
50
|
|
|
51
51
|
## Hello World - Simplest Implementation
|
|
52
52
|
|
|
@@ -70,7 +70,7 @@ The complete code of the "Hello World" example is shown below
|
|
|
70
70
|
<body>
|
|
71
71
|
<div id="camera-view-container" style="width: 100%; height: 60vh"></div>
|
|
72
72
|
<textarea id="results" style="width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto" disabled></textarea>
|
|
73
|
-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.
|
|
73
|
+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>
|
|
74
74
|
<script>
|
|
75
75
|
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
|
|
76
76
|
Dynamsoft.Core.CoreModule.loadWasm();
|
|
@@ -192,19 +192,19 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
|
|
|
192
192
|
- jsDelivr
|
|
193
193
|
|
|
194
194
|
```html
|
|
195
|
-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.
|
|
195
|
+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
- UNPKG
|
|
199
199
|
|
|
200
200
|
```html
|
|
201
|
-
<script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.4.
|
|
201
|
+
<script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
<!-- - In some rare cases (such as some restricted areas), you might not be able to access the CDN. If this happens, you can use the following files for the test.
|
|
205
205
|
|
|
206
206
|
```html
|
|
207
|
-
<script src="https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.4.
|
|
207
|
+
<script src="https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>
|
|
208
208
|
```
|
|
209
209
|
|
|
210
210
|
However, please **DO NOT** use `download2.dynamsoft.com` resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself. -->
|
|
@@ -212,9 +212,9 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
|
|
|
212
212
|
- In frameworks like React, Vue and Angular, you may want to add the package as a dependency.
|
|
213
213
|
|
|
214
214
|
```sh
|
|
215
|
-
npm i dynamsoft-barcode-reader-bundle@11.4.
|
|
215
|
+
npm i dynamsoft-barcode-reader-bundle@11.4.2001 -E
|
|
216
216
|
# or
|
|
217
|
-
yarn add dynamsoft-barcode-reader-bundle@11.4.
|
|
217
|
+
yarn add dynamsoft-barcode-reader-bundle@11.4.2001 -E
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
NOTE that in frameworks, you need to [specify the location of the engine files](#2-optional-specify-the-location-of-the-engine-files).
|
|
@@ -234,7 +234,7 @@ Besides using the public CDN, you can also download the SDK and host its files o
|
|
|
234
234
|
- From npm
|
|
235
235
|
|
|
236
236
|
```sh
|
|
237
|
-
npm i dynamsoft-barcode-reader-bundle@11.4.
|
|
237
|
+
npm i dynamsoft-barcode-reader-bundle@11.4.2001 -E
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
The resources are located at the path `node_modules/<pkg>`, without `@<version>`. You must copy "dynamsoft-xxx" packages elsewhere and add `@<version>`. The `<version>` can be obtained from `package.json` of each package. Another thing to do is to [specify the engineResourcePaths](#2-optional-specify-the-location-of-the-engine-files) so that the SDK can correctly locate the resources.
|
|
@@ -243,7 +243,7 @@ Besides using the public CDN, you can also download the SDK and host its files o
|
|
|
243
243
|
You can typically include SDK like this:
|
|
244
244
|
|
|
245
245
|
```html
|
|
246
|
-
<script src="path/to/dynamsoft-barcode-reader-bundle@11.4.
|
|
246
|
+
<script src="path/to/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>
|
|
247
247
|
```
|
|
248
248
|
<div class="multi-panel-end"></div>
|
|
249
249
|
|
|
@@ -562,7 +562,7 @@ await cvRouter.startCapturing("ReadSingleBarcode");
|
|
|
562
562
|
|
|
563
563
|
The preset templates have many more settings that can be customized to suit your use case best. If you [download the SDK from Dynamsoft website](https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/), you can find the templates under
|
|
564
564
|
|
|
565
|
-
* "/dynamsoft-barcode-reader-js-11.4.
|
|
565
|
+
* "/dynamsoft-barcode-reader-js-11.4.2001/dist/templates/"
|
|
566
566
|
|
|
567
567
|
Upon completing the template editing, you can invoke the `initSettings` method and provide it with the template path as an argument.
|
|
568
568
|
|
|
@@ -664,7 +664,7 @@ The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on ho
|
|
|
664
664
|
### API Reference
|
|
665
665
|
|
|
666
666
|
You can check out the detailed documentation about the APIs of the SDK at
|
|
667
|
-
[https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.
|
|
667
|
+
[https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2001](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2001).
|
|
668
668
|
|
|
669
669
|
<!-- Compatibility is basically not an issue. Pls remove to another place
|
|
670
670
|
|