Skip to content

Commit 1324ca2

Browse files
committed
demo
1 parent 5b22158 commit 1324ca2

File tree

38 files changed

+626
-38
lines changed

38 files changed

+626
-38
lines changed

barcode-scanner-api-samples/scan-multiple-barcodes/cart-builder.html

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,66 @@ <h2>Simulated Shopping Cart</h2>
115115
</div>
116116
</div>
117117

118+
<noscript>
119+
120+
<iframe
121+
122+
src="https://www.googletagmanager.com/ns.html?id=GTM-538F83"
123+
124+
height="0"
125+
126+
width="0"
127+
128+
style="display: none; visibility: hidden"
129+
130+
></iframe>
131+
132+
</noscript>
133+
134+
<script>
135+
136+
if (!navigator.webdriver) {
137+
138+
setTimeout(() => {
139+
140+
(function (w, d, s, l, i) {
141+
142+
w[l] = w[l] || [];
143+
144+
w[l].push({
145+
146+
"gtm.start": new Date().getTime(),
147+
148+
event: "gtm.js",
149+
150+
});
151+
152+
var f = d.getElementsByTagName(s)[0],
153+
154+
j = d.createElement(s),
155+
156+
dl = l != "dataLayer" ? "&l=" + l : "";
157+
158+
j.async = true;
159+
160+
j.src = "//www.googletagmanager.com/gtm.js?id=" + i + dl;
161+
162+
f.parentNode.insertBefore(j, f);
163+
164+
})(window, document, "script", "dataLayer", "GTM-538F83");
165+
166+
}, 0);
167+
168+
}
169+
170+
</script>
118171
<script>
119172
// Function to initialize and launch the barcode scanner
120173
async function startScanner() {
121174
// Create a new instance of Dynamsoft BarcodeScanner with configuration options
122175
const scanner = new Dynamsoft.BarcodeScanner({
123176
// License key for Dynamsoft Barcode Reader (replace with a valid key)
124-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9",
177+
license: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==",
125178

126179
// Specify the path to the engine resources (loaded from CDN in this case)
127180
engineResourcePaths: {

barcode-scanner-api-samples/scan-multiple-barcodes/hello-world.html

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,64 @@ <h1 class="barcode-scanner-title">
5252
<!-- This div will act as the container for the barcode scanner UI -->
5353
<div class="barcode-scanner-view"></div>
5454

55+
<noscript>
56+
57+
<iframe
58+
59+
src="https://www.googletagmanager.com/ns.html?id=GTM-538F83"
60+
61+
height="0"
62+
63+
width="0"
64+
65+
style="display: none; visibility: hidden"
66+
67+
></iframe>
68+
69+
</noscript>
70+
71+
<script>
72+
73+
if (!navigator.webdriver) {
74+
75+
setTimeout(() => {
76+
77+
(function (w, d, s, l, i) {
78+
79+
w[l] = w[l] || [];
80+
81+
w[l].push({
82+
83+
"gtm.start": new Date().getTime(),
84+
85+
event: "gtm.js",
86+
87+
});
88+
89+
var f = d.getElementsByTagName(s)[0],
90+
91+
j = d.createElement(s),
92+
93+
dl = l != "dataLayer" ? "&l=" + l : "";
94+
95+
j.async = true;
96+
97+
j.src = "//www.googletagmanager.com/gtm.js?id=" + i + dl;
98+
99+
f.parentNode.insertBefore(j, f);
100+
101+
})(window, document, "script", "dataLayer", "GTM-538F83");
102+
103+
}, 0);
104+
105+
}
106+
107+
</script>
55108
<script>
56109
// Configuration object for initializing the BarcodeScanner instance. Refer to https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html#barcodescannerconfig
57110
let config = {
58111
// Replace with your Dynamsoft license key
59-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9",
112+
license: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==",
60113

61114
// Specify where to render the scanner UI
62115
container: ".barcode-scanner-view",

barcode-scanner-api-samples/scan-single-barcode/angular/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class AppComponent {
1313
async ngAfterViewInit(): Promise<void> {
1414
// Configuration object for initializing the BarcodeScanner instance
1515
const config = {
16-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", // Replace with your Dynamsoft license key
16+
license: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", // Replace with your Dynamsoft license key
1717
container: ".barcode-scanner-view", // Specify where to render the scanner UI
1818

1919
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.

barcode-scanner-api-samples/scan-single-barcode/hello-world.html

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,63 @@ <h1 class="barcode-scanner-title">
5353
<!-- This div will host the barcode scanner's camera view -->
5454
<div class="barcode-scanner-view"></div>
5555

56+
<noscript>
57+
58+
<iframe
59+
60+
src="https://www.googletagmanager.com/ns.html?id=GTM-538F83"
61+
62+
height="0"
63+
64+
width="0"
65+
66+
style="display: none; visibility: hidden"
67+
68+
></iframe>
69+
70+
</noscript>
71+
72+
<script>
73+
74+
if (!navigator.webdriver) {
75+
76+
setTimeout(() => {
77+
78+
(function (w, d, s, l, i) {
79+
80+
w[l] = w[l] || [];
81+
82+
w[l].push({
83+
84+
"gtm.start": new Date().getTime(),
85+
86+
event: "gtm.js",
87+
88+
});
89+
90+
var f = d.getElementsByTagName(s)[0],
91+
92+
j = d.createElement(s),
93+
94+
dl = l != "dataLayer" ? "&l=" + l : "";
95+
96+
j.async = true;
97+
98+
j.src = "//www.googletagmanager.com/gtm.js?id=" + i + dl;
99+
100+
f.parentNode.insertBefore(j, f);
101+
102+
})(window, document, "script", "dataLayer", "GTM-538F83");
103+
104+
}, 0);
105+
106+
}
107+
108+
</script>
56109
<script>
57110
// Configuration object for initializing the BarcodeScanner instance. Refer to https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html#barcodescannerconfig
58111
let config = {
59-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", // Replace with your Dynamsoft license key
112+
license: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", // Replace with your Dynamsoft license key
60113
container: ".barcode-scanner-view", // Specify where to render the scanner UI
61114
};
62115

barcode-scanner-api-samples/scan-single-barcode/react/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function App() {
77
useEffect(() => {
88
// Configuration object for initializing the BarcodeScanner instance
99
const config = {
10-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", // Replace with your Dynamsoft license key
10+
license: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", // Replace with your Dynamsoft license key
1111
container: ".barcode-scanner-view", // Specify where to render the scanner UI
1212

1313
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.

barcode-scanner-api-samples/scan-single-barcode/vue/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import vueLogo from "./assets/vue.svg";
66
onMounted(() => {
77
// Configuration object for initializing the BarcodeScanner instance
88
const config = {
9-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", // Replace with your Dynamsoft license key
9+
license: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", // Replace with your Dynamsoft license key
1010
container: ".barcode-scanner-view", // Specify where to render the scanner UI
1111
1212
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.

foundational-api-samples/hello-world/angular/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
8181
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
8282
*/
8383

84-
LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', true);
84+
LicenseManager.initLicense('DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==', true);
8585

8686
/**
8787
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.

foundational-api-samples/hello-world/angular/src/app/dynamsoft.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CoreModule.engineResourcePaths.rootDirectory = 'https://cdn.jsdelivr.net/npm/';
99
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
1010
*/
1111

12-
LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', {
12+
LicenseManager.initLicense('DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==', {
1313
executeNow: true,
1414
});
1515

foundational-api-samples/hello-world/blazor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ Inside the `wwwroot\index.html` file, we will initialize the license and necessa
288288
/** LICENSE ALERT - README
289289
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
290290
*/
291-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
291+
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==");
292292

293293
/**
294294
* 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.

foundational-api-samples/hello-world/blazor/hello-world-blazor/BlazorApp/wwwroot/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
3838
*/
3939

40-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
40+
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==");
4141

4242
/**
4343
* 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.

foundational-api-samples/hello-world/electron/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Dynamsoft.Core.CoreModule.engineResourcePaths = {
156156
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
157157
*/
158158

159-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", {
159+
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", {
160160
executeNow: true,
161161
});
162162

foundational-api-samples/hello-world/electron/action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Dynamsoft.Core.CoreModule.engineResourcePaths = {
1313
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
1414
*/
1515

16-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", {
16+
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", {
1717
executeNow: true,
1818
});
1919

foundational-api-samples/hello-world/es6.html

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,60 @@ <h1>Hello World for ES6 (Decode via Camera)</h1>
1414
<div id="camera-view-container" style="width: 100%; height: 80vh"></div>
1515
Results:<br />
1616
<div id="results" style="width: 100%; height: 10vh; overflow: auto; white-space: pre-wrap"></div>
17+
18+
<noscript>
19+
20+
<iframe
21+
22+
src="https://www.googletagmanager.com/ns.html?id=GTM-538F83"
23+
24+
height="0"
25+
26+
width="0"
27+
28+
style="display: none; visibility: hidden"
29+
30+
></iframe>
31+
32+
</noscript>
33+
34+
<script>
35+
36+
if (!navigator.webdriver) {
37+
38+
setTimeout(() => {
39+
40+
(function (w, d, s, l, i) {
41+
42+
w[l] = w[l] || [];
43+
44+
w[l].push({
45+
46+
"gtm.start": new Date().getTime(),
47+
48+
event: "gtm.js",
49+
50+
});
51+
52+
var f = d.getElementsByTagName(s)[0],
53+
54+
j = d.createElement(s),
55+
56+
dl = l != "dataLayer" ? "&l=" + l : "";
57+
58+
j.async = true;
59+
60+
j.src = "//www.googletagmanager.com/gtm.js?id=" + i + dl;
61+
62+
f.parentNode.insertBefore(j, f);
63+
64+
})(window, document, "script", "dataLayer", "GTM-538F83");
65+
66+
}, 0);
67+
68+
}
69+
70+
</script>
1771
<script type="module">
1872
import {
1973
CoreModule,
@@ -28,7 +82,7 @@ <h1>Hello World for ES6 (Decode via Camera)</h1>
2882
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
2983
*/
3084

31-
LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
85+
LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==");
3286

3387
/**
3488
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.

foundational-api-samples/hello-world/hello-world.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>Hello World (Decode via Camera)</h1>
2424
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
2525
*/
2626

27-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
27+
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==");
2828

2929
/**
3030
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.

foundational-api-samples/hello-world/native-ts/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
1313
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
1414
*/
1515

16-
LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
16+
LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==");
1717

1818
/**
1919
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.

foundational-api-samples/hello-world/next/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
7979
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
8080
*/
8181

82-
LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", {
82+
LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", {
8383
executeNow: true,
8484
});
8585

foundational-api-samples/hello-world/next/dynamsoft.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
99
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
1010
*/
1111

12-
LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", {
12+
LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", {
1313
executeNow: true,
1414
});
1515

foundational-api-samples/hello-world/nuxt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
6767
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
6868
*/
6969

70-
LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", {
70+
LicenseManager.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLWRicl9qc19zYW1wbGVzIiwib3JnYW5pemF0aW9uSUQiOiIyMDAwMDAifQ==", {
7171
executeNow: true,
7272
});
7373

0 commit comments

Comments
 (0)