Skip to content

Commit 860e4b6

Browse files
committed
2 parents cfc7041 + 0e1ce65 commit 860e4b6

Some content is hidden

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

53 files changed

+2835
-379
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,25 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
3838
*/
3939

4040
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/[email protected]/dist/";
41-
let pScanner = null;
4241
(async function() {
4342
try {
44-
const scanner = await (pScanner = pScanner || BarcodeScanner.createInstance());
43+
const scanner = await BarcodeScanner.createInstance();
44+
/*
45+
* 'onFrameRead' is triggered after the library finishes reading a frame.
46+
* There can be one or multiple barcodes on each frame.
47+
*/
4548
scanner.onFrameRead = results => {
4649
console.log("Barcodes on one frame:");
4750
for (let result of results) {
4851
const format = result.barcodeFormatString;
4952
console.log(format + ": " + result.barcodeText);
5053
}
5154
};
55+
/*
56+
* onUnduplicatdRead is triggered only when a 'new' barcode is found.
57+
* The amount of time that the library 'remembers' a barcode is defined by
58+
* "duplicateForgetTime" in "ScanSettings". By default it is set to 3000 ms.
59+
*/
5260
scanner.onUniqueRead = (txt, result) => {
5361
alert(txt);
5462
console.log("Unique Code Found: ", result);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
3636

3737
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/[email protected]/dist/";
3838

39-
let pScanner = null;
4039
(async () => {
4140
try {
42-
const scanner = await (pScanner = pScanner || BarcodeScanner.createInstance());
41+
const scanner = await BarcodeScanner.createInstance();
4342
/*
4443
* 'onFrameRead' is triggered after the library finishes reading a frame.
4544
* There can be one or multiple barcodes on each frame.

1.hello-world/13.read-video-react-hook/README.md

Lines changed: 443 additions & 25 deletions
Large diffs are not rendered by default.

1.hello-world/13.read-video-react-hook/public/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
8-
<meta
9-
name="description"
10-
content="Web site created using create-react-app"
11-
/>
8+
<meta name="description" content="Read barcode with Dynamsoft Barcode Reader in a React Application.">
9+
<meta name="keywords" content="read barcode from camera and images in React">
10+
<link rel="canonical" href="https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/13.read-video-react-hook/build/">
1211
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
1312
<!--
1413
manifest.json provides metadata used when your web app is installed on a

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@angular/platform-browser": "^15.2.0",
1919
"@angular/platform-browser-dynamic": "^15.2.0",
2020
"@angular/router": "^15.2.0",
21-
"dynamsoft-javascript-barcode": "^9.6.10",
21+
"dynamsoft-javascript-barcode": "^9.6.11",
2222
"rxjs": "~7.8.0",
2323
"tslib": "^2.3.0",
2424
"zone.js": "~0.12.0"

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.10&utm_source=github#specify-the-license or contact [email protected].
12+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.11&utm_source=github#specify-the-license or contact [email protected].
1313
* LICENSE ALERT - THE END
1414
*/
1515

16-
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/[email protected].10/dist/';
16+
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/[email protected].11/dist/';

1.hello-world/4.read-video-react/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,4 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
420420

421421
## Support
422422

423-
If you have any questions, feel free to contact Dynamsoft support via [email](mailto:[email protected]) or [live chat](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) via the "Let's Chat" button.
423+
If you have any questions, feel free to contact Dynamsoft support via [email](mailto:[email protected]) or [live chat](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) via the "Let's Chat" button.
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
.DS_Store
2-
node_modules
3-
/package-lock.json
4-
# /dist (for demoing purpose)
5-
6-
7-
# local env files
8-
.env.local
9-
.env.*.local
10-
11-
# Log files
1+
# Logs
2+
logs
3+
*.log
124
npm-debug.log*
135
yarn-debug.log*
146
yarn-error.log*
157
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
*.local
15+
16+
/cypress/videos/
17+
/cypress/screenshots/
1618

1719
# Editor directories and files
18-
.idea
1920
.vscode
21+
!.vscode/extensions.json
22+
.idea
2023
*.suo
2124
*.ntvs*
2225
*.njsproj
2326
*.sln
2427
*.sw?
25-
26-
# others
27-
28-
*.lock

0 commit comments

Comments
 (0)