Skip to content

Commit dc66e3e

Browse files
authored
Merge pull request #14 from Dynamsoft/_dev
9.0.0
2 parents 433814f + 58d61c1 commit dc66e3e

File tree

66 files changed

+1232
-880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1232
-880
lines changed

1.hello-world/1.minimum-code.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@
1212
<body>
1313
<h1 style="font-size: 1.5em;">Read Barcodes from a Camera</h1>
1414
<button id="btn-show-scanner">Show Barcode Scanner</button>
15-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js"></script>
15+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js"></script>
1616
<script>
17-
/** LICENSE ALERT - README
18-
*
19-
* The library requires a license to work.
20-
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
21-
* Note that network connection is required for the public license to work.
22-
* 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.
17+
/** LICENSE ALERT - README
18+
* To use the library, you need to first specify a license key using the API "license" as shown below.
2319
*/
2420

25-
/* When using your own license, uncomment the following line and specify your license. */
21+
Dynamsoft.DBR.BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
2622

27-
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
28-
29-
/** LICENSE ALERT - THE END */
23+
/**
24+
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
25+
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
26+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
27+
* LICENSE ALERT - THE END
28+
*/
3029

3130
let pScanner = null;
3231
document.getElementById('btn-show-scanner').onclick = async function() {
@@ -43,11 +42,11 @@ <h1 style="font-size: 1.5em;">Read Barcodes from a Camera</h1>
4342
}
4443
};
4544
/*
46-
* onUnduplicatdRead is triggered only when a 'new' barcode is found.
45+
* onUniqueRead is triggered only when a 'new' barcode is found.
4746
* The amount of time that the library 'remembers' a barcode is defined by
4847
* "duplicateForgetTime" in "ScanSettings". By default it is set to 3000 ms.
4948
*/
50-
scanner.onUnduplicatedRead = (txt, result) => {
49+
scanner.onUniqueRead = (txt, result) => {
5150
alert(txt);
5251
console.log("Unique Code Found: ", result);
5352
}

1.hello-world/10.read-video-pwa/helloworld-pwa.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,20 @@
1313
<body>
1414
<h1 style="font-size: 1.5em;">Hello World for PWA</h1>
1515
<button id='readBarcode'>Read Barcode via Camera</button>
16-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js"></script>
1717
<script>
18-
/** LICENSE ALERT - README
19-
*
20-
* The library requires a license to work.
21-
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
22-
* Note that network connection is required for the public license to work.
23-
* 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.
18+
/** LICENSE ALERT - README
19+
* To use the library, you need to first specify a license key using the API "license" as shown below.
2420
*/
2521

26-
/* When using your own license, uncomment the following line and specify your license. */
27-
28-
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
22+
Dynamsoft.DBR.BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
2923

30-
/** LICENSE ALERT - THE END */
24+
/**
25+
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
26+
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
27+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
28+
* LICENSE ALERT - THE END
29+
*/
3130

3231
let pScanner = null;
3332
let latestResult = null;
@@ -45,7 +44,7 @@ <h1 style="font-size: 1.5em;">Hello World for PWA</h1>
4544
console.log(result.barcodeFormatString + ": " + result.barcodeText);
4645
}
4746
};
48-
scanner.onUnduplicatedRead = (txt, result) => {
47+
scanner.onUniqueRead = (txt, result) => {
4948
latestResult = txt;
5049
alert(txt, result);
5150
}

1.hello-world/11.read-video-requirejs.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,24 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
1313
<button id="readBarcode">show scanner</button>
1414
<script src="https://cdn.jsdelivr.net/npm/requirejs@2.3.6/require.js"></script>
1515
<script>
16-
requirejs(['https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js'], function({
16+
requirejs(['https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js'], function({
1717
BarcodeReader,
1818
BarcodeScanner
1919
}) {
20-
/** LICENSE ALERT - README
21-
*
22-
* The library requires a license to work.
23-
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
24-
* Note that network connection is required for the public license to work.
25-
* 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.
20+
/** LICENSE ALERT - README
21+
* To use the library, you need to first specify a license key using the API "license" as shown below.
2622
*/
2723

28-
/* When using your own license, uncomment the following line and specify your license. */
29-
30-
// BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
24+
BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
3125

32-
/** LICENSE ALERT - THE END */
26+
/**
27+
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
28+
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
29+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
30+
* LICENSE ALERT - THE END
31+
*/
3332

34-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/";
33+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/";
3534
let pScanner = null;
3635
document.getElementById('readBarcode').onclick = async function() {
3736
try {
@@ -42,7 +41,7 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
4241
console.log(result.barcodeFormatString + ": " + result.barcodeText);
4342
}
4443
};
45-
scanner.onUnduplicatedRead = (txt, result) => {
44+
scanner.onUniqueRead = (txt, result) => {
4645
alert(txt);
4746
console.log("Unique Code Found: ", result);
4847
}
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,21 @@
1313
<h1 style="font-size: 1.5em;">Read Barcodes from a Camera</h1>
1414
<button id="btn-show-scanner">Show Barcode Scanner</button>
1515
<script type="module">
16-
import { BarcodeReader, BarcodeScanner } from 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.mjs';
17-
/** LICENSE ALERT - README
18-
*
19-
* The library requires a license to work.
20-
* If the license is not specified, a free public trial license will be used by default which is the case in this sample.
21-
* Note that network connection is required for the public license to work.
22-
* 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.
16+
import { BarcodeReader, BarcodeScanner } from 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.mjs';
17+
/** LICENSE ALERT - README
18+
* To use the library, you need to first specify a license key using the API "license" as shown below.
2319
*/
2420

25-
/* When using your own license, uncomment the following line and specify your license. */
26-
27-
// BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
28-
29-
/** LICENSE ALERT - THE END */
30-
31-
// DBR.productKeys = "PRODUCT-KEYS";
21+
BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
22+
23+
/**
24+
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
25+
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
26+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
27+
* LICENSE ALERT - THE END
28+
*/
3229

33-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/";
30+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/";
3431

3532
let pScanner = null;
3633
document.getElementById('btn-show-scanner').addEventListener('click', async () => {
@@ -51,7 +48,7 @@ <h1 style="font-size: 1.5em;">Read Barcodes from a Camera</h1>
5148
* The amount of time that the library 'remembers' a barcode is defined by
5249
* "duplicateForgetTime" in "ScanSettings". By default it is set to 3000 ms.
5350
*/
54-
scanner.onUnduplicatedRead = (txt, result) => {
51+
scanner.onUniqueRead = (txt, result) => {
5552
alert(txt);
5653
console.log("Unique Code Found: ", result);
5754
}

1.hello-world/12.read-video-webpack/index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

1.hello-world/12.read-video-webpack/package.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

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

Lines changed: 0 additions & 40 deletions
This file was deleted.

1.hello-world/12.read-video-webpack/webpack.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

1.hello-world/2.read-an-image.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,20 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
2424
.sp-resultText { color: #cE5E04 }
2525
#div-cvs-container canvas { border: solid 1px gray; }
2626
</style>
27-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js"></script>
2828
<script>
29-
/** LICENSE ALERT - README
30-
*
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.
29+
/** LICENSE ALERT - README
30+
* To use the library, you need to first specify a license key using the API "license" as shown below.
3531
*/
3632

37-
/* When using your own license, uncomment the following line and specify your license. */
33+
Dynamsoft.DBR.BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
3834

39-
// Dynamsoft.DBR.BarcodeReader.license = "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
40-
41-
/** LICENSE ALERT - THE END */
35+
/**
36+
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
37+
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
38+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
39+
* LICENSE ALERT - THE END
40+
*/
4241

4342
// Load the library on page load to speed things up.
4443
(async() => {
@@ -74,7 +73,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
7473

7574
// show image
7675
divCvsContainer.innerHTML = '';
77-
divCvsContainer.appendChild(reader.oriCanvas);
76+
divCvsContainer.appendChild(reader.getOriginalImageInACanvas());
7877

7978
// show results
8079
divResults.appendChild(createEl('h3', file.name + ": "));

1.hello-world/3.read-video-angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@angular/platform-browser": "~11.2.5",
2020
"@angular/platform-browser-dynamic": "~11.2.5",
2121
"@angular/router": "~11.2.5",
22-
"dynamsoft-javascript-barcode": "8.8.7",
22+
"dynamsoft-javascript-barcode": "9.0.0",
2323
"rxjs": "~6.6.0",
2424
"tslib": "^2.0.0",
2525
"zone.js": "~0.11.3"
@@ -43,4 +43,4 @@
4343
"tslint": "~6.1.0",
4444
"typescript": "~4.1.5"
4545
}
46-
}
46+
}

0 commit comments

Comments
 (0)