Skip to content

Commit e6c09e2

Browse files
author
Cube
authored
Merge pull request #100 from Dynamsoft/_dev
Dev
2 parents 266fa78 + 10f5403 commit e6c09e2

37 files changed

+169
-59
lines changed

1.hello-world/1.hello-world.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212

1313
<body>
1414
Loading...
15-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/dbr.js"></script>
15+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/dbr.js"></script>
16+
<script>
17+
if(location.protocol === "file:") {
18+
const message = `The page is opened via file:// and "BarcodeScanner" may not work properly. Please open the page via https:// or host it on "http://localhost/".`;
19+
console.warn(message);
20+
alert(message);
21+
}
22+
</script>
1623
<script>
1724
/** LICENSE ALERT - README
1825
* To use the library, you need to first specify a license key using the API "license" as shown below.
@@ -23,7 +30,7 @@
2330
/**
2431
* 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.
2532
* 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.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
33+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2734
* LICENSE ALERT - THE END
2835
*/
2936

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@
1414
<body>
1515
<h1 style="font-size: 1.5em;">Hello World for PWA</h1>
1616
Loading...
17-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/dbr.js"></script>
17+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/dbr.js"></script>
18+
<script>
19+
if(location.protocol === "file:") {
20+
const message = `The page is opened via file:// and "BarcodeScanner" may not work properly. Please open the page via https:// or host it on "http://localhost/".`;
21+
console.warn(message);
22+
alert(message);
23+
}
24+
</script>
1825
<script>
1926
/** LICENSE ALERT - README
2027
* To use the library, you need to first specify a license key using the API "license" as shown below.
@@ -25,7 +32,7 @@ <h1 style="font-size: 1.5em;">Hello World for PWA</h1>
2532
/**
2633
* 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.
2734
* 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.
28-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
35+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2936
* LICENSE ALERT - THE END
3037
*/
3138

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
1313
Loading...
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@9.6.2/dist/dbr.js'], function({
16+
if(location.protocol === "file:") {
17+
const message = `The page is opened via file:// and "BarcodeScanner" may not work properly. Please open the page via https:// or host it on "http://localhost/".`;
18+
console.warn(message);
19+
alert(message);
20+
}
21+
</script>
22+
<script>
23+
requirejs(['https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/dbr.js'], function({
1724
BarcodeReader,
1825
BarcodeScanner
1926
}) {
@@ -26,11 +33,11 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
2633
/**
2734
* 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.
2835
* 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.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
36+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
3037
* LICENSE ALERT - THE END
3138
*/
3239

33-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/";
40+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/";
3441
let pScanner = null;
3542
(async function() {
3643
try {

1.hello-world/12.read-video-es6.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@
1212
<body>
1313
<h1 style="font-size: 1.5em;">Hello World for ES6</h1>
1414
Loading...
15+
<script>
16+
if(location.protocol === "file:") {
17+
const message = `The page is opened via file:// and "BarcodeScanner" may not work properly. Please open the page via https:// or host it on "http://localhost/".`;
18+
console.warn(message);
19+
alert(message);
20+
}
21+
</script>
1522
<script type="module">
16-
import { BarcodeReader, BarcodeScanner } from 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/dbr.mjs';
23+
import { BarcodeReader, BarcodeScanner } from 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/dbr.mjs';
1724
/** LICENSE ALERT - README
1825
* To use the library, you need to first specify a license key using the API "license" as shown below.
1926
*/
@@ -23,11 +30,11 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
2330
/**
2431
* 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.
2532
* 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.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
33+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2734
* LICENSE ALERT - THE END
2835
*/
2936

30-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/";
37+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/";
3138

3239
let pScanner = null;
3340
(async () => {

1.hello-world/13.read-video-react-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@types/node": "^16.11.45",
1212
"@types/react": "^18.0.15",
1313
"@types/react-dom": "^18.0.6",
14-
"dynamsoft-javascript-barcode": "9.6.2",
14+
"dynamsoft-javascript-barcode": "9.6.10",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0",
1717
"react-scripts": "5.0.1",

1.hello-world/13.read-video-react-ts/src/dbr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
99
/**
1010
* 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.
1111
* 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.
12-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
12+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
1313
* LICENSE ALERT - THE END
1414
*/
1515

16-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/";
16+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
3030
border: solid 1px gray;
3131
}
3232
</style>
33-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/dbr.js"></script>
33+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/dbr.js"></script>
3434
<script>
3535
/** LICENSE ALERT - README
3636
* To use the library, you need to first specify a license key using the API "license" as shown below.
@@ -41,7 +41,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
4141
/**
4242
* 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.
4343
* 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.
44-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
44+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
4545
* LICENSE ALERT - THE END
4646
*/
4747

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

Lines changed: 1 addition & 1 deletion
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": "9.6.2",
22+
"dynamsoft-javascript-barcode": "9.6.10",
2323
"rxjs": "~6.6.0",
2424
"tslib": "^2.0.0",
2525
"zone.js": "~0.11.3"

1.hello-world/3.read-video-angular/src/app/dbr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
99
/**
1010
* 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.
1111
* 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.
12-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.2&utm_source=github#specify-the-license or contact support@dynamsoft.com.
12+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact support@dynamsoft.com.
1313
* LICENSE ALERT - THE END
1414
*/
1515

16-
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.2/dist/';
16+
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.10/dist/';

1.hello-world/4.read-video-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@testing-library/jest-dom": "^5.11.4",
88
"@testing-library/react": "^11.1.0",
99
"@testing-library/user-event": "^12.1.10",
10-
"dynamsoft-javascript-barcode": "9.6.2",
10+
"dynamsoft-javascript-barcode": "9.6.10",
1111
"react": "^18.2.0",
1212
"react-dom": "^18.2.0",
1313
"react-scripts": "^4.0.3",

0 commit comments

Comments
 (0)