You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<sup>2</sup> The compact edition downloads and compiles faster, which makes it more suitable for the scenario where a customer only needs to scan a barcode once. In comparison, scenarios where an employee needs to scan lots of barcodes continuously or where uncommon barcodes or advanced features are required, use the full edition by simply setting the following before you call `loadWasm` or `CreateInstance`.
@@ -307,24 +307,24 @@ In the following sections, you'll find more detailed information on how the libr
307
307
308
308
The library is based on the `WebAssembly` standard; therefore, **on first use**, it needs some time to download and compile the `wasm` files. After the first use, the browser may cache the file so that the next time no 'downloading' is required.
309
309
310
-
`Dynamsoft.BarcodeReader.loadWasm` is the API to start the initialization.
310
+
`Dynamsoft.DBR.BarcodeReader.loadWasm` is the API to start the initialization.
311
311
312
312
```js
313
313
try{
314
-
awaitDynamsoft.BarcodeReader.loadWasm();
314
+
awaitDynamsoft.DBR.BarcodeReader.loadWasm();
315
315
}catch(ex){
316
316
console.error(ex);
317
317
}
318
318
```
319
319
320
-
That said, as shown in the sample above, you don't necessarily need to call the above API because other APIs like `Dynamsoft.BarcodeReader.createInstance` and `Dynamsoft.BarcodeScanner.createInstance` will call `loadWasm` themselves.
320
+
That said, as shown in the sample above, you don't necessarily need to call the above API because other APIs like `Dynamsoft.DBR.BarcodeReader.createInstance` and `Dynamsoft.DBR.BarcodeScanner.createInstance` will call `loadWasm` themselves.
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/yfkcajxz/)
375
+
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/pa7g85wh/)
376
376
377
377
As you can see in the code, there are three categories of configurations.
378
378
379
379
*`get/updateVideoSettings`: Configures the data source, i.e., the video stream. These settings include which camera to use, the resolution, etc.. Learn more [here](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Syntax).
380
-
*`get/updateRuntimeSettings`: Configures the decode engine. Find a full list of these settings and their corresponding descriptions [here](https://www.dynamsoft.com/help/Barcode-Reader/struct_dynamsoft_1_1_barcode_1_1_public_runtime_settings.html).
381
-
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/f24h8c1m/)
380
+
*`get/updateRuntimeSettings`: Configures the decode engine. Find a full list of these settings and their corresponding descriptions [here](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html?ver=latest).
381
+
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/h3o4kfau/)
382
382
383
383
e.g.
384
384
```js
@@ -396,13 +396,13 @@ As you can see in the code, there are three categories of configurations.
396
396
```js
397
397
let settings =awaitbarcodeScanner.getRuntimeSettings();
*`get/updateScanSettings`: Configures the behavior of the scanner which includes `duplicateForgetTime`, `intervalTime` and `filter`, etc.
405
+
*`get/updateScanSettings`: Configures the behavior of the scanner which includes `duplicateForgetTime`, `intervalTime`, etc.
406
406
407
407
### Customizing the UI
408
408
@@ -411,7 +411,7 @@ While the library provides a built-in `BarcodeScanner` which has its own UI, fee
411
411
The default scanner UI is defined in the file `dist/dbr.scanner.html`. There are 3 ways to customize it:
412
412
413
413
1. Modify the file `dist/dbr.scanner.html` directly (only possible when you deploy these files yourself instead of using the CDN).
414
-
2. Copy the file `dist/dbr.scanner.html`, modify it and specify the new file as the default UI by its URL `Dynamsoft.BarcodeScanner.defaultUIElementURL = url`. Note that you must set `defaultUIElementURL` before you call `createInstance`.
414
+
2. Copy the file `dist/dbr.scanner.html`, modify it and specify the new file as the default UI by its URL `Dynamsoft.DBR.BarcodeScanner.defaultUIElementURL = url`. Note that you must set `defaultUIElementURL` before you call `createInstance`.
415
415
3. Build the UI into your own web page and call `scanner.setUIElement(HTMLElement)` to specify that element.
416
416
417
417
The following introduces the 3rd way. Check out the following code on how it's done.
@@ -428,7 +428,7 @@ The following introduces the 3rd way. Check out the following code on how it's d
> 8 default resolutions will automatically show up.
465
465
466
-
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/25v08paf/)
466
+
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/ygx0mvL7/)
467
467
468
468
Too many resolutions may be overwhelming for end users. Check out the following code on how to offer your own resolution options.
469
469
@@ -480,87 +480,15 @@ Too many resolutions may be overwhelming for end users. Check out the following
480
480
>
481
481
> **Solution**: To take care of this issue, you can add an option with the class name `dbrScanner-opt-gotResolution` (as shown above) which the library will then use to show the actual resolution being used.
482
482
483
-
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/tnfjks4q/)
484
-
485
-
<!--
486
-
#### Customizing Further
487
-
488
-
You may not want to use elements with the default class names to show the camera list or resolution list. In this case, you need to populate the two lists yourself.
489
-
490
-
For camera list, you can use the API `getAllCameras()` to get all available cameras and then populate them on the page.
491
-
492
-
```HTML
493
-
<select id="custom-camera-list"></select>
494
-
```
495
-
496
-
```javascript
497
-
let cameraList = document.getElementById("custom-camera-list");
498
-
let allCameras = await scanner.getAllCameras();
499
-
let currentCamera = await scanner.getCurrentCamera();
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/taykq592/)
541
+
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/ju0c64ow/)
614
542
615
543
## Self-hosted | Offline | Intranet Deployment
616
544
@@ -649,7 +577,7 @@ Locate the following files and place them in the same directory on your server.
649
577
650
578
If the resource files like the `wasm` files are not placed in the same directory as the file `dbr.js`. Then you will need to specify the path with the API `engineResourcePath`. Note that it must be set before `loadWasm` or `createInstance` is called.
* If you have deployed the library files on your own server, you'll need to replace the old files with the new version. Download the latest version [here](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).
674
-
675
-
#### From versions prior to`7.2.2-v2` to `7.3.0-v0`
676
-
677
-
Dynamsoft made several changes in the version `7.2.2-v2`; therefore it may take a bit more effort to upgrade the library from an older version to the version `7.2.2-v2` or a later version including the latest `7.3.0-v0` (as of January 2020). Apart from changing the code to include the correct version of the library, you'll also need to make changes to your code related to the APIs of the library. Check out [this post](https://blog.dynamsoft.com/insights/dynamsoft-barcode-reader-sdk-for-javascript-upgrade-from-v7-1-3-to-v7-2-2/) for more information. If you need further assistance with the upgrade, please feel free to contact [Dynamsoft Support](#contact-us).
It takes several steps to activate a purchased license, the following steps assume you have already acquired a commercial license from Dynamsoft. If you haven't done so yet, you can purchase a license [here](https://www.dynamsoft.com/Secure/Barcode-Reader-BuyIt.aspx).
694
-
695
-
***Step One** : Log in the [Customer Portal](https://www.dynamsoft.com/customer/license/fullLicense) with your Dynamsoft account
696
-
697
-
If you don't have an Dynamsoft account, sign up [here](https://www.dynamsoft.com/CustomerPortal/Account/Registration.aspx). Be sure to use the same email that was registered for the purchase.
698
-
699
-
***Step Two** : Find the License
700
-
701
-
Once logged in, click **Full License** under **License** on the left menu bar and you should be able to see your purchased key on the right pane.
702
-
703
-
***Step Three** : Activate the License
704
-
705
-
Under **Status**, click the button **Activate** to go to the Activation page, click **Activate** again and confirm the activation.
706
-
707
-
***Step Four** : Set a Domain
708
-
709
-
This step is optional but recommended. By setting a domain to your key, you can protect it against usage abuse. To do this, go back to **Full License**, find your License and click **Details**. On the Details page, click **Order Detail** to get to the order details page where you can see a **Set Domain** button. Click it, specify a domain and submit.
710
-
711
-
> A few examples of the domain
712
-
>
713
-
> www.dynamsoft.com
714
-
>
715
-
> demo.dynamsoft.com
716
-
>
717
-
> \*.dynamsoft.com
718
-
719
-
***Step Five** : Use the License
720
-
721
-
You may have noticed that in all the samples above, we have the following line of code
722
-
723
-
```html
724
-
<!-- Please visit https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx to get a trial license. -->
0 commit comments