Skip to content

Commit 606264e

Browse files
committed
renaming namespace APIs
1 parent ff53589 commit 606264e

File tree

13 files changed

+108
-158
lines changed

13 files changed

+108
-158
lines changed

1.hello-world/12.read-video-webpack/src/index.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
import DBR from "dynamsoft-javascript-barcode";
22

33
/** LICENSE ALERT - README
4-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
5-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
6-
* Note that network connection is required for this license to work.
4+
*
5+
* The library requires a license to work.
6+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
7+
* Note that network connection is required for the public license to work.
8+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
79
*/
810

9-
/* When using your own license, uncomment the following line and specify your Organization ID. */
11+
/* When using your own license, uncomment the following line and specify your license. */
1012

11-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
12-
13-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
14-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
15-
16-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
17-
18-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
13+
// DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
1914

2015
/** LICENSE ALERT - THE END */
2116

22-
DBR.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/";
17+
DBR.BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/";
2318

2419
let pScanner = null;
2520
if (document.getElementById('readBarcode')) {

1.hello-world/7.read-video-nextjs/dbr.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
import DBR from "dynamsoft-javascript-barcode";
22

33
/** LICENSE ALERT - README
4-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
5-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
6-
* Note that network connection is required for this license to work.
4+
*
5+
* The library requires a license to work.
6+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
7+
* Note that network connection is required for the public license to work.
8+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
79
*/
810

9-
/* When using your own license, uncomment the following line and specify your Organization ID. */
11+
/* When using your own license, uncomment the following line and specify your license. */
1012

11-
// DBR.organizationID = "YOUR-ORGANIZATION-ID";
12-
13-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
14-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
15-
16-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
17-
18-
// DBR.productKeys = "YOUR-PRODUCT-KEY";
13+
// DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
1914

2015
/** LICENSE ALERT - THE END */
2116

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
import DBR from "dynamsoft-javascript-barcode";
22

33
/** LICENSE ALERT - README
4-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
5-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
6-
* Note that network connection is required for this license to work.
4+
*
5+
* The library requires a license to work.
6+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
7+
* Note that network connection is required for the public license to work.
8+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
79
*/
810

9-
/* When using your own license, uncomment the following line and specify your Organization ID. */
11+
/* When using your own license, uncomment the following line and specify your license. */
1012

11-
// DBR.organizationID = "YOUR-ORGANIZATION-ID";
12-
13-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
14-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
15-
16-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
17-
18-
// DBR.productKeys = "YOUR-PRODUCT-KEY";
13+
// DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
1914

2015
/** LICENSE ALERT - THE END */
2116

2217
DBR.BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/";
2318

24-
export default DBR;
19+
export default DBR;

1.hello-world/9.read-video-electron/action.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
window.onload = function () {
22
/** LICENSE ALERT - README
3-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
4-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
5-
* Note that network connection is required for this license to work.
3+
*
4+
* The library requires a license to work.
5+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
6+
* Note that network connection is required for the public license to work.
7+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
68
*/
79

8-
/* When using your own license, uncomment the following line and specify your Organization ID. */
10+
/* When using your own license, uncomment the following line and specify your license. */
911

10-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
11-
12-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
13-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
14-
15-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
16-
17-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
12+
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
1813

1914
/** LICENSE ALERT - THE END */
20-
21-
Dynamsoft.DBR.loadWasm();
15+
16+
Dynamsoft.DBR.BarcodeReader.loadWasm();
2217
let pScanner = null;
2318
document.getElementById('readBarcode').onclick = async () => {
2419
try {

1.hello-world/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Let's break down each of the samples
1010

1111
In this sample, you will find the basic lines of code ncessary to initialize the library and set it up.
1212

13-
Please note that if no license is specified in code via the `organizationID` property or the `productKeys` property, as shown in the commented lines of code, a 7-day public trial will be used starting from v8.2.5. In earlier versions, an error will be thrown if no license, trial or full, is specified.
13+
Please note that if no license is specified in code via the `organizationID` property or the `productKeys` property, as shown in the commented lines of code, a free public trial will be used starting from v8.2.5. In earlier versions, an error will be thrown if no license, trial or full, is specified.
1414

1515
Let's quickly break down the methods used in order:
1616

2.ui-tweaking/1.read-video-show-result.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,15 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
2828
</div>
2929
<script>
3030
/** LICENSE ALERT - README
31-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
32-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
33-
* Note that network connection is required for this license to work.
31+
* The library requires a license to work.
32+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
33+
* Note that network connection is required for the public license to work.
34+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
3435
*/
3536

36-
/* When using your own license, uncomment the following line and specify your Organization ID. */
37+
/* When using your own license, uncomment the following line and specify your license. */
3738

38-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
39-
40-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
41-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
42-
43-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
44-
45-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
39+
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
4640

4741
/** LICENSE ALERT - THE END */
4842

2.ui-tweaking/2.read-video-no-extra-control.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,15 @@ <h1 style="font-size: 1.5em;">Hide UI Controllers</h1>
2323
</div>
2424
<script>
2525
/** LICENSE ALERT - README
26-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
27-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
28-
* Note that network connection is required for this license to work.
26+
* The library requires a license to work.
27+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
28+
* Note that network connection is required for the public license to work.
29+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2930
*/
3031

31-
/* When using your own license, uncomment the following line and specify your Organization ID. */
32+
/* When using your own license, uncomment the following line and specify your license. */
3233

33-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
34-
35-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
36-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
37-
38-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
39-
40-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
34+
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
4135

4236
/** LICENSE ALERT - THE END */
4337

2.ui-tweaking/3.read-video-with-external-control.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,15 @@ <h1 style="font-size: 1.5em;">Customized UI</h1>
5959
</div>
6060
<script>
6161
/** LICENSE ALERT - README
62-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
63-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
64-
* Note that network connection is required for this license to work.
62+
* The library requires a license to work.
63+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
64+
* Note that network connection is required for the public license to work.
65+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
6566
*/
6667

67-
/* When using your own license, uncomment the following line and specify your Organization ID. */
68+
/* When using your own license, uncomment the following line and specify your license. */
6869

69-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
70-
71-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
72-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
73-
74-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
75-
76-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
70+
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
7771

7872
/** LICENSE ALERT - THE END */
7973

2.ui-tweaking/4.difference-video-size.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,15 @@ <h1 style="font-size: 1.5em;">Enlarge the Video Stream</h1>
2727
</div>
2828
<script>
2929
/** LICENSE ALERT - README
30-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
31-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
32-
* Note that network connection is required for this license to work.
30+
* The library requires a license to work.
31+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
32+
* Note that network connection is required for the public license to work.
33+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
3334
*/
3435

35-
/* When using your own license, uncomment the following line and specify your Organization ID. */
36+
/* When using your own license, uncomment the following line and specify your license. */
3637

37-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
38-
39-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
40-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
41-
42-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
43-
44-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
38+
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
4539

4640
/** LICENSE ALERT - THE END */
4741

3.settings/initScanner.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,15 @@ let resultBox = document.getElementById('result');
1212
window.onload = async function () {
1313
try {
1414
/** LICENSE ALERT - README
15-
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
16-
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
17-
* Note that network connection is required for this license to work.
15+
* The library requires a license to work.
16+
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
17+
* Note that network connection is required for the public license to work.
18+
* For more info, please check https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=8.8.7&utm_source=github#specify-the-license or contact support@dynamsoft.com.
1819
*/
1920

20-
/* When using your own license, uncomment the following line and specify your Organization ID. */
21+
/* When using your own license, uncomment the following line and specify your license. */
2122

22-
// Dynamsoft.DBR.organizationID = "YOUR-ORGANIZATION-ID";
23-
24-
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=samples */
25-
/* For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
26-
27-
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
28-
29-
// Dynamsoft.DBR.productKeys = "YOUR-PRODUCT-KEY";
23+
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
3024

3125
/** LICENSE ALERT - THE END */
3226

0 commit comments

Comments
 (0)