Skip to content

Commit 4155de0

Browse files
committed
remove duplicate titles
1 parent a4405d0 commit 4155de0

File tree

10 files changed

+55
-54
lines changed

10 files changed

+55
-54
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { BarcodeReader } from 'dynamsoft-javascript-barcode';
22

3-
/** LICENSE ALERT - README
3+
/** LICENSE ALERT - README
44
* To use the library, you need to first specify a license key using the API "license" as shown below.
55
*/
66

77
BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
8-
9-
/**
10-
* 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.
8+
9+
/**
10+
* 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.
1212
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact [email protected].
13-
* LICENSE ALERT - THE END
13+
* LICENSE ALERT - THE END
1414
*/
1515

1616
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/';
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { BarcodeReader } from "dynamsoft-javascript-barcode";
22

3-
/** LICENSE ALERT - README
3+
/** LICENSE ALERT - README
44
* To use the library, you need to first specify a license key using the API "license" as shown below.
55
*/
66

77
BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
8-
9-
/**
10-
* 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.
8+
9+
/**
10+
* 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.
1212
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact [email protected].
13-
* LICENSE ALERT - THE END
13+
* LICENSE ALERT - THE END
1414
*/
1515

1616
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/[email protected]/dist/";
Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
1-
/** LICENSE ALERT - README
2-
* To use the library, you need to first specify a license key using the API "license" as shown below.
3-
*/
4-
5-
Dynamsoft.DBR.BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
6-
7-
/**
8-
* 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.
9-
* 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.
10-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact [email protected].
11-
* LICENSE ALERT - THE END
12-
*/
13-
14-
Dynamsoft.DBR.BarcodeReader.loadWasm();
15-
let pScanner = null;
16-
document.getElementById('readBarcode').onclick = async () => {
17-
try {
18-
const scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
19-
scanner.onFrameRead = results => {
20-
if (results.length) {
21-
console.log(results);
22-
}
23-
};
24-
scanner.onUniqueRead = (txt, result) => {
25-
alert(txt, result);
26-
};
27-
document.getElementById("barcodeScannerUI").appendChild(scanner.getUIElement());
28-
await scanner.show();
29-
} catch (ex) {
30-
alert(ex.message);
31-
throw ex;
32-
}
33-
};
1+
(async function () {
2+
Dynamsoft.DBR.BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
3+
Dynamsoft.DBR.BarcodeReader.loadWasm();
4+
let pScanner = null;
5+
document.getElementById('readBarcode').onclick = async () => {
6+
try {
7+
let scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
8+
scanner.onFrameRead = results => {
9+
if (results.length) {
10+
console.log(results);
11+
}
12+
};
13+
scanner.onUniqueRead = (txt, result) => {
14+
document.getElementById('resultText').value = result.barcodeFormatString + ': ' + txt;
15+
};
16+
document.getElementById("barcodeScannerUI").appendChild(scanner.getUIElement());
17+
await scanner.show();
18+
} catch (ex) {
19+
alert(ex.message);
20+
throw ex;
21+
}
22+
};
23+
})();

1.hello-world/9.read-video-electron/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33

44
<head>
55
<meta charset="UTF-8">
6-
<meta name="description" content="Read barcodes from camera with Dynamsoft Barcode Reader in an Electron Application.">
7-
<meta name="keywords" content="read barcode from camera in Electron">
86
<title>Read barcodes from a video input in Electron!</title>
97
<link href="style.css" rel="stylesheet">
108
</head>
119

1210
<body>
13-
<h1 style="font-size: 1.5em;">Hello World for Electron</h1>
11+
<h1>Read barcodes from a video input</h1>
1412
<button id='readBarcode'>Read Barcode via Camera</button>
15-
<div class="container">
13+
<div id="UIElement">
1614
<div id="barcodeScannerUI"></div>
1715
</div>
16+
<input id="resultText" type="text" readonly="true">
1817
<script src="./node_modules/dynamsoft-javascript-barcode/dist/dbr.js"></script>
1918
<script src="action.js"></script>
2019
</body>
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
body {
23
text-align: center;
34
}
@@ -7,10 +8,21 @@ body {
78
height: 100%;
89
}
910

10-
.container {
11+
#UIElement {
1112
margin: 2vmin auto;
1213
text-align: center;
1314
font-size: medium;
14-
height: 60vh;
15+
height: 40vh;
16+
width: 80vw;
17+
}
18+
#resultText {
19+
display: block;
20+
margin: 0 auto;
21+
padding: 0.4rem 0.8rem;
22+
color: inherit;
1523
width: 80vw;
24+
border: none;
25+
font-size: 1rem;
26+
border-radius: 0.2rem;
27+
text-align: center;
1628
}

3.settings/1.barcodeFormats-expectedBarcodes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<meta name="description" content="Read barcodes from camera with Dynamsoft Barcode Reader and update simple runtime settings.">
88
<meta name="keywords" content="read barcode from camera, formats and count">
9-
<title>Dynamsoft Barcode Reader Sample - Using Runtime Settings</title>
9+
<title>Dynamsoft Barcode Reader Sample - Limit Barcode Formats or Count</title>
1010
<!--
1111
This sample makes use of the library hosted by the CDN jsDelivr. If you would rather use the
1212
library offline. Please see the guide on how to host the library:

3.settings/2.localizationModes-binarizationModes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<meta name="description" content="Read barcodes from camera with Dynamsoft Barcode Reader and update simple runtime settings.">
88
<meta name="keywords" content="read barcode from camera, formats and count">
9-
<title>Dynamsoft Barcode Reader Sample - Using Runtime Settings</title>
9+
<title>Dynamsoft Barcode Reader Sample - Blurred or Small Barcodes</title>
1010
<!--
1111
This sample makes use of the library hosted by the CDN jsDelivr. If you would rather use the
1212
library offline. Please see the guide on how to host the library:

3.settings/3.blurred-small-barcodes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<meta name="description" content="Read barcodes from camera with Dynamsoft Barcode Reader and update settings for blurry or small codes.">
88
<meta name="keywords" content="read barcode from camera, blurry, small">
9-
<title>Dynamsoft Barcode Reader Sample - Using Runtime Settings</title>
9+
<title>Dynamsoft Barcode Reader Sample - Blurred Small Barcodes</title>
1010
<!--
1111
This sample makes use of the library hosted by the CDN jsDelivr. If you would rather use the
1212
library offline. Please see the guide on how to host the library:

3.settings/4.deformed-incomplete-barcodes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<meta name="description" content="Read barcodes from camera with Dynamsoft Barcode Reader and update settings for deformed or incomplete codes.">
88
<meta name="keywords" content="read barcode from camera, deformed, incomplete">
9-
<title>Dynamsoft Barcode Reader Sample - Using Runtime Settings</title>
9+
<title>Dynamsoft Barcode Reader Sample - Deformed or Incomplete Barcodes</title>
1010
<!--
1111
This sample makes use of the library hosted by the CDN jsDelivr. If you would rather use the
1212
library offline. Please see the guide on how to host the library:

3.settings/5.regionOfInterest-regionPredetection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<meta name="description" content="Read barcodes from camera with Dynamsoft Barcode Reader, read only the area of interest.">
88
<meta name="keywords" content="read barcode from camera, region of interest">
9-
<title>Dynamsoft Barcode Reader Sample - Using Runtime Settings</title>
9+
<title>Dynamsoft Barcode Reader Sample - Region Definition or Pre-detection</title>
1010
<!--
1111
This sample makes use of the library hosted by the CDN jsDelivr. If you would rather use the
1212
library offline. Please see the guide on how to host the library:

0 commit comments

Comments
 (0)