dynamsoft-barcode-reader-bundle 11.6.2100 → 11.6.3100

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/LEGAL.txt CHANGED
@@ -1,4 +1,4 @@
1
- \===================================================================================
1
+ ===================================================================================
2
2
  >>>>>>>>>>>>>>>>>>>>>>>> dynamsoft-barcode-reader-bundle <<<<<<<<<<<<<<<<<<<<<<<<<<
3
3
  ===================================================================================
4
4
 
package/README.html CHANGED
@@ -247,7 +247,7 @@
247
247
  <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
248
248
  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;camera-view-container&quot;</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;width: 100%; height: 60vh&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
249
249
  <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;results&quot;</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto&quot;</span> <span class="hljs-attr">disabled</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
250
- <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
250
+ <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
251
251
  <span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
252
252
  Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">&quot;DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9&quot;</span>);
253
253
  Dynamsoft.Core.CoreModule.loadWasm();
@@ -261,11 +261,9 @@
261
261
 
262
262
  <span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#results&quot;</span>);
263
263
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver({ <span class="hljs-attr">onDecodedBarcodesReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
264
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
265
- resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
266
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
267
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
268
- }
264
+ resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
265
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
266
+ resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
269
267
  }
270
268
  }});
271
269
 
@@ -282,7 +280,7 @@
282
280
  <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
283
281
  </code></pre>
284
282
  <p align="center" style="text-align:center; white-space: normal; ">
285
- <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.21/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
283
+ <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.31/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
286
284
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;">
287
285
  </a>
288
286
  &nbsp;
@@ -290,7 +288,7 @@
290
288
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;" >
291
289
  </a>
292
290
  &nbsp;
293
- <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.21&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
291
+ <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
294
292
  <img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;">
295
293
  </a>
296
294
  </p>
@@ -333,7 +331,7 @@ cvRouter.addResultFilter(filter);
333
331
  <p>Read more on <a href="https://www.dynamsoft.com/capture-vision/docs/core/architecture/#capture-vision-router">Capture Vision Router</a>.</p>
334
332
  </blockquote>
335
333
  <h3 id="run-the-example">Run the example</h3>
336
- <p>You can run the example deployed to <a href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.21&utm_source=npm">the Dynamsoft Demo Server</a> or test it with <a href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/">JSFiddle code editor</a>. </p>
334
+ <p>You can run the example deployed to <a href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm">the Dynamsoft Demo Server</a> or test it with <a href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/">JSFiddle code editor</a>. </p>
337
335
  <p>You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it.</p>
338
336
  <p>When a barcode is decoded, you will see the result text show up under the video and the barcode location will be highlighted in the video feed.</p>
339
337
  <p>Alternatively, you can test locally by copying and pasting the code shown above into a local file (e.g. "hello-world.html") and opening it in your browser.</p>
@@ -341,7 +339,7 @@ cvRouter.addResultFilter(filter);
341
339
  <p><em>Secure Contexts</em>:</p>
342
340
  <p>If you open the web page as <code>http://</code>, our SDK may not work correctly because the <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia">MediaDevices: getUserMedia()</a> and other methods only work in <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts">secure contexts</a> (HTTPS, <code>localhost</code>, <code>127.0.0.1</code>, <code>file://</code>), in some or all supporting browsers.</p>
343
341
  <p>Regarding configuring https on your server, these guides for <a href="https://nginx.org/en/docs/http/configuring_https_servers.html">nginx</a> / <a href="https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/">IIS</a> / <a href="https://dzone.com/articles/setting-ssl-tomcat-5-minutes">tomcat</a> / <a href="https://nodejs.org/docs/v0.4.1/api/tls.html">nodejs</a> might help.</p>
344
- <p>If the test doesn't go as expected, you can <a href="https://www.dynamsoft.com/company/contact/?ver=11.6.21&utm_source=npm&product=dbr&package=js">contact us</a>.</p>
342
+ <p>If the test doesn't go as expected, you can <a href="https://www.dynamsoft.com/company/contact/?ver=11.6.31&utm_source=npm&product=dbr&package=js">contact us</a>.</p>
345
343
  </blockquote>
346
344
  <h2 id="preparing-the-sdk">Preparing the SDK</h2>
347
345
  <h3 id="step-1-include-the-sdk">Step 1: Include the SDK</h3>
@@ -355,24 +353,24 @@ cvRouter.addResultFilter(filter);
355
353
  <ul>
356
354
  <li>jsDelivr</li>
357
355
  </ul>
358
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
356
+ <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
359
357
  </code></pre>
360
358
  <ul>
361
359
  <li>UNPKG</li>
362
360
  </ul>
363
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
361
+ <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
364
362
  </code></pre>
365
363
  <!-- - 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.
366
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
364
+ <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
367
365
  </code></pre>
368
366
 
369
367
  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. -->
370
368
  <ul>
371
369
  <li>In frameworks like React, Vue and Angular, you may want to add the package as a dependency.</li>
372
370
  </ul>
373
- <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.2100 -E
371
+ <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
374
372
  <span class="hljs-comment"># or</span>
375
- yarn add dynamsoft-barcode-reader-bundle@11.6.2100 -E
373
+ yarn add dynamsoft-barcode-reader-bundle@11.6.3100 -E
376
374
  </code></pre>
377
375
  <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>
378
376
  <div class="multi-panel-end"></div>
@@ -381,18 +379,18 @@ cvRouter.addResultFilter(filter);
381
379
  <p>Besides using the public CDN, you can also download the SDK and host its files on your own server or a commercial CDN before including it in your application.</p>
382
380
  <ul>
383
381
  <li><p>From the website</p>
384
- <p><a href="https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.21&utm_source=npm&product=dbr&package=js">Download Dynamsoft Barcode Reader JavaScript Package</a></p>
382
+ <p><a href="https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.31&utm_source=npm&product=dbr&package=js">Download Dynamsoft Barcode Reader JavaScript Package</a></p>
385
383
  <p>The resources are located at the path <code>dynamsoft-barcode-reader-js-{version-number}/dist/</code>.</p></li>
386
384
  <li><p>From npm</p></li>
387
385
  </ul>
388
- <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.2100 -E
386
+ <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
389
387
  </code></pre>
390
388
  <p>The resources are located at the path <code>node_modules/&lt;pkg&gt;</code>, without <code>@&lt;version&gt;</code>. You must copy "dynamsoft-xxx" packages elsewhere and add <code>@&lt;version&gt;</code>. The <code>&lt;version&gt;</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>
391
389
  <blockquote>
392
390
  <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>
393
391
  </blockquote>
394
392
  <p>You can typically include SDK like this:</p>
395
- <pre><code class="hljs html language-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;path/to/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
393
+ <pre><code class="hljs html language-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;path/to/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
396
394
  </code></pre>
397
395
  <div class="multi-panel-end"></div>
398
396
  <div class="multi-panel-switching-end"></div>
@@ -416,7 +414,7 @@ cvRouter.addResultFilter(filter);
416
414
  <p>To enable the SDK's functionality, you must provide a valid license. Utilize the API function initLicense to set your license key.</p>
417
415
  <pre><code class="hljs javascript language-javascript">Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">&quot;DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9&quot;</span>);
418
416
  </code></pre>
419
- <p>As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.21&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.</p>
417
+ <p>As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.31&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.</p>
420
418
  <blockquote>
421
419
  <p>Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples.</p>
422
420
  </blockquote>
@@ -479,12 +477,10 @@ cvRouter.setInput(cameraEnhancer);
479
477
  <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#results&quot;</span>);
480
478
  <span class="hljs-keyword">const</span> resultReceiver = <span class="hljs-keyword">new</span> Dynamsoft.CVR.CapturedResultReceiver();
481
479
  resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
482
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
483
- resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
484
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
485
- <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
486
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
487
- }
480
+ resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
481
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
482
+ <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
483
+ resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
488
484
  }
489
485
  };
490
486
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver(resultReceiver);
@@ -492,12 +488,10 @@ resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span c
492
488
  <p>You can also write code like this. It is the same.</p>
493
489
  <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#results&quot;</span>);
494
490
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver({ <span class="hljs-attr">onDecodedBarcodesReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
495
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
496
- resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
497
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
498
- <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
499
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
500
- }
491
+ resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
492
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
493
+ <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
494
+ resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
501
495
  }
502
496
  }});
503
497
  </code></pre>
@@ -588,13 +582,11 @@ settings.barcodeSettings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_Q
588
582
  <span class="hljs-attr">onCapturedResultReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
589
583
  <span class="hljs-comment">//Check for barcode results</span>
590
584
  <span class="hljs-keyword">let</span> barcodeResultItems = result.items.filter(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> item.type === EnumCRIT.CRIT_BARCODE);
591
- <span class="hljs-keyword">if</span> (barcodeResultItems.length &gt; <span class="hljs-number">0</span>) {
592
- <span class="hljs-keyword">let</span> image = result.items.filter(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[<span class="hljs-number">0</span>]?.imageData; <span class="hljs-comment">// Retrieve the original image.</span>
593
- <span class="hljs-keyword">if</span> (image) <span class="hljs-built_in">document</span>.body.appendChild(image.toCanvas()); <span class="hljs-comment">// Append the image to DOM.</span>
594
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> barcodeResultItems) {
595
- <span class="hljs-comment">// Print each barcode result to the console.</span>
596
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Barcode: <span class="hljs-subst">${item.text}</span>, Format: <span class="hljs-subst">${item.formatString}</span>`</span>);
597
- }
585
+ <span class="hljs-keyword">let</span> image = result.items.filter(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[<span class="hljs-number">0</span>]?.imageData; <span class="hljs-comment">// Retrieve the original image.</span>
586
+ <span class="hljs-keyword">if</span> (image) <span class="hljs-built_in">document</span>.body.appendChild(image.toCanvas()); <span class="hljs-comment">// Append the image to DOM.</span>
587
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> barcodeResultItems) {
588
+ <span class="hljs-comment">// Print each barcode result to the console.</span>
589
+ <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Barcode: <span class="hljs-subst">${item.text}</span>, Format: <span class="hljs-subst">${item.formatString}</span>`</span>);
598
590
  }
599
591
  },
600
592
  });
@@ -658,7 +650,7 @@ settings.timeout = <span class="hljs-number">500</span>;
658
650
  <h3 id="2-edit-the-preset-templates-directly">2. Edit the preset templates directly</h3>
659
651
  <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>
660
652
  <ul>
661
- <li>"/dynamsoft-barcode-reader-js-11.6.2100/dist/templates/"</li>
653
+ <li>"/dynamsoft-barcode-reader-js-11.6.3100/dist/templates/"</li>
662
654
  </ul>
663
655
  <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>
664
656
  <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">await</span> cvRouter.initSettings(<span class="hljs-string">&quot;PATH-TO-THE-FILE&quot;</span>); <span class="hljs-comment">// E.g. &quot;https://your-website/ReadSingleBarcode.json&quot;)</span>
@@ -705,9 +697,7 @@ filter.setDuplicateForgetTime(<span class="hljs-string">&quot;barcode&quot;</spa
705
697
  <p>The following code snippet adds a "beep" sound for when a barcode is found:</p>
706
698
  <pre><code class="hljs js language-js"><span class="hljs-keyword">const</span> resultReceiver = <span class="hljs-keyword">new</span> Dynamsoft.CVR.CapturedResultReceiver();
707
699
  resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
708
- <span class="hljs-keyword">if</span> (result.barcodeResultItems.length &gt; <span class="hljs-number">0</span>) {
709
- Dynamsoft.DCE.Feedback.beep();
710
- }
700
+ Dynamsoft.DCE.Feedback.beep();
711
701
  };
712
702
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver(resultReceiver);
713
703
  </code></pre>
@@ -732,7 +722,7 @@ uiElement.querySelector(<span class="hljs-string">&#x27;.dce-sel-resolution&#x27
732
722
  <h2 id="documentation">Documentation</h2>
733
723
  <h3 id="api-reference">API Reference</h3>
734
724
  <p>You can check out the detailed documentation about the APIs of the SDK at<br />
735
- <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.2100">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.2100</a>.</p>
725
+ <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100</a>.</p>
736
726
  <!-- Compatibility is basically not an issue. Pls remove to another place
737
727
 
738
728
  ## System Requirements
package/README.md CHANGED
@@ -34,7 +34,7 @@ The complete code of the "Hello World" example is shown below
34
34
  <body>
35
35
  <div id="camera-view-container" style="width: 100%; height: 60vh"></div>
36
36
  <textarea id="results" style="width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto" disabled></textarea>
37
- <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js"></script>
37
+ <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
38
38
  <script>
39
39
  Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
40
40
  Dynamsoft.Core.CoreModule.loadWasm();
@@ -48,11 +48,9 @@ The complete code of the "Hello World" example is shown below
48
48
 
49
49
  const resultsContainer = document.querySelector("#results");
50
50
  await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => {
51
- if (result.barcodeResultItems?.length) {
52
- resultsContainer.textContent = '';
53
- for (let item of result.barcodeResultItems) {
54
- resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
55
- }
51
+ resultsContainer.textContent = '';
52
+ for (let item of result.barcodeResultItems) {
53
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
56
54
  }
57
55
  }});
58
56
 
@@ -70,7 +68,7 @@ The complete code of the "Hello World" example is shown below
70
68
  ```
71
69
 
72
70
  <p align="center" style="text-align:center; white-space: normal; ">
73
- <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.21/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
71
+ <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.31/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
74
72
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;">
75
73
  </a>
76
74
  &nbsp;
@@ -78,7 +76,7 @@ The complete code of the "Hello World" example is shown below
78
76
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;" >
79
77
  </a>
80
78
  &nbsp;
81
- <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.21&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
79
+ <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
82
80
  <img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;">
83
81
  </a>
84
82
  </p>
@@ -123,7 +121,7 @@ The complete code of the "Hello World" example is shown below
123
121
 
124
122
  ### Run the example
125
123
 
126
- You can run the example deployed to [the Dynamsoft Demo Server](https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.21&utm_source=npm) or test it with [JSFiddle code editor](https://jsfiddle.net/DynamsoftTeam/csm2f9wb/).
124
+ You can run the example deployed to [the Dynamsoft Demo Server](https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm) or test it with [JSFiddle code editor](https://jsfiddle.net/DynamsoftTeam/csm2f9wb/).
127
125
 
128
126
  You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it.
129
127
 
@@ -137,7 +135,7 @@ Alternatively, you can test locally by copying and pasting the code shown above
137
135
  >
138
136
  > Regarding configuring https on your server, these guides for [nginx](https://nginx.org/en/docs/http/configuring_https_servers.html) / [IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) / [tomcat](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) / [nodejs](https://nodejs.org/docs/v0.4.1/api/tls.html) might help.
139
137
  >
140
- > If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.com/company/contact/?ver=11.6.21&utm_source=npm&product=dbr&package=js).
138
+ > If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.com/company/contact/?ver=11.6.31&utm_source=npm&product=dbr&package=js).
141
139
 
142
140
  ## Preparing the SDK
143
141
 
@@ -156,19 +154,19 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
156
154
  - jsDelivr
157
155
 
158
156
  ```html
159
- <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js"></script>
157
+ <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
160
158
  ```
161
159
 
162
160
  - UNPKG
163
161
 
164
162
  ```html
165
- <script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js"></script>
163
+ <script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
166
164
  ```
167
165
 
168
166
  <!-- - 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.
169
167
 
170
168
  ```html
171
- <script src="https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js"></script>
169
+ <script src="https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
172
170
  ```
173
171
 
174
172
  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. -->
@@ -176,9 +174,9 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
176
174
  - In frameworks like React, Vue and Angular, you may want to add the package as a dependency.
177
175
 
178
176
  ```sh
179
- npm i dynamsoft-barcode-reader-bundle@11.6.2100 -E
177
+ npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
180
178
  # or
181
- yarn add dynamsoft-barcode-reader-bundle@11.6.2100 -E
179
+ yarn add dynamsoft-barcode-reader-bundle@11.6.3100 -E
182
180
  ```
183
181
 
184
182
  NOTE that in frameworks, you need to [specify the location of the engine files](#2-optional-specify-the-location-of-the-engine-files).
@@ -191,14 +189,14 @@ Besides using the public CDN, you can also download the SDK and host its files o
191
189
 
192
190
  - From the website
193
191
 
194
- [Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.21&utm_source=npm&product=dbr&package=js)
192
+ [Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.31&utm_source=npm&product=dbr&package=js)
195
193
 
196
194
  The resources are located at the path `dynamsoft-barcode-reader-js-{version-number}/dist/`.
197
195
 
198
196
  - From npm
199
197
 
200
198
  ```sh
201
- npm i dynamsoft-barcode-reader-bundle@11.6.2100 -E
199
+ npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
202
200
  ```
203
201
 
204
202
  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.
@@ -207,7 +205,7 @@ Besides using the public CDN, you can also download the SDK and host its files o
207
205
  You can typically include SDK like this:
208
206
 
209
207
  ```html
210
- <script src="path/to/dynamsoft-barcode-reader-bundle@11.6.2100/dist/dbr.bundle.js"></script>
208
+ <script src="path/to/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
211
209
  ```
212
210
  <div class="multi-panel-end"></div>
213
211
 
@@ -239,7 +237,7 @@ To enable the SDK's functionality, you must provide a valid license. Utilize the
239
237
  Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
240
238
  ```
241
239
 
242
- As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.21&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.
240
+ As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.31&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.
243
241
 
244
242
  > Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples.
245
243
 
@@ -331,12 +329,10 @@ Once the image processing is complete, the results are sent to all the registere
331
329
  const resultsContainer = document.querySelector("#results");
332
330
  const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
333
331
  resultReceiver.onDecodedBarcodesReceived = (result) => {
334
- if (result.barcodeResultItems?.length) {
335
- resultsContainer.textContent = '';
336
- for (let item of result.barcodeResultItems) {
337
- // In this example, the barcode results are displayed on the page below the video.
338
- resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
339
- }
332
+ resultsContainer.textContent = '';
333
+ for (let item of result.barcodeResultItems) {
334
+ // In this example, the barcode results are displayed on the page below the video.
335
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
340
336
  }
341
337
  };
342
338
  await cvRouter.addResultReceiver(resultReceiver);
@@ -347,12 +343,10 @@ You can also write code like this. It is the same.
347
343
  ```javascript
348
344
  const resultsContainer = document.querySelector("#results");
349
345
  await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => {
350
- if (result.barcodeResultItems?.length) {
351
- resultsContainer.textContent = '';
352
- for (let item of result.barcodeResultItems) {
353
- // In this example, the barcode results are displayed on the page below the video.
354
- resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
355
- }
346
+ resultsContainer.textContent = '';
347
+ for (let item of result.barcodeResultItems) {
348
+ // In this example, the barcode results are displayed on the page below the video.
349
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
356
350
  }
357
351
  }});
358
352
  ```
@@ -438,13 +432,11 @@ await cvRouter.addResultReceiver({
438
432
  onCapturedResultReceived: (result) => {
439
433
  //Check for barcode results
440
434
  let barcodeResultItems = result.items.filter((item) => item.type === EnumCRIT.CRIT_BARCODE);
441
- if (barcodeResultItems.length > 0) {
442
- let image = result.items.filter((item) => item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[0]?.imageData; // Retrieve the original image.
443
- if (image) document.body.appendChild(image.toCanvas()); // Append the image to DOM.
444
- for (let item of barcodeResultItems) {
445
- // Print each barcode result to the console.
446
- console.log(`Barcode: ${item.text}, Format: ${item.formatString}`);
447
- }
435
+ let image = result.items.filter((item) => item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[0]?.imageData; // Retrieve the original image.
436
+ if (image) document.body.appendChild(image.toCanvas()); // Append the image to DOM.
437
+ for (let item of barcodeResultItems) {
438
+ // Print each barcode result to the console.
439
+ console.log(`Barcode: ${item.text}, Format: ${item.formatString}`);
448
440
  }
449
441
  },
450
442
  });
@@ -526,7 +518,7 @@ await cvRouter.startCapturing("ReadSingleBarcode");
526
518
 
527
519
  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
528
520
 
529
- * "/dynamsoft-barcode-reader-js-11.6.2100/dist/templates/"
521
+ * "/dynamsoft-barcode-reader-js-11.6.3100/dist/templates/"
530
522
 
531
523
  Upon completing the template editing, you can invoke the `initSettings` method and provide it with the template path as an argument.
532
524
 
@@ -594,9 +586,7 @@ The following code snippet adds a "beep" sound for when a barcode is found:
594
586
  ```js
595
587
  const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
596
588
  resultReceiver.onDecodedBarcodesReceived = (result) => {
597
- if (result.barcodeResultItems.length > 0) {
598
- Dynamsoft.DCE.Feedback.beep();
599
- }
589
+ Dynamsoft.DCE.Feedback.beep();
600
590
  };
601
591
  await cvRouter.addResultReceiver(resultReceiver);
602
592
  ```
@@ -628,7 +618,7 @@ The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on ho
628
618
  ### API Reference
629
619
 
630
620
  You can check out the detailed documentation about the APIs of the SDK at
631
- [https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.2100](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.2100).
621
+ [https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100).
632
622
 
633
623
  <!-- Compatibility is basically not an issue. Pls remove to another place
634
624