Skip to content

Commit 5cc0d71

Browse files
committed
updated comments, renamed a few samples
1 parent 8fe250f commit 5cc0d71

19 files changed

+292
-167
lines changed

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

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,24 @@ <h2>Minimum Code to Read Barcodes</h2>
1313
<button id='readBarcode'>Read Barcode via Camera</button>
1414
<script>
1515
/** LICENSE ALERT - README
16-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
17-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
16+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
17+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
1818
* Note that network connection is required for this license to work.
1919
*/
2020

21-
/* When using your own license, please uncomment the following lines and fill in your own information. */
22-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
23-
21+
/* When using your own license, uncomment the following line and specify your Organization ID. */
22+
2423
// Dynamsoft.DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
25-
// Dynamsoft.DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
26-
// Dynamsoft.DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
27-
// Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
28-
24+
25+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
26+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
27+
2928
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
30-
29+
3130
// Dynamsoft.DBR.BarcodeReader.productKeys = "YOUR-PRODUCT-KEY";
32-
33-
/** LICENSE ALERT - THE END */
3431

32+
/** LICENSE ALERT - THE END */
33+
3534
let scanner = null;
3635
document.getElementById('readBarcode').onclick = async function () {
3736
try {

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,22 @@ <h2>Read An Existing Image</h2>
2424
</div>
2525
<script>
2626
/** LICENSE ALERT - README
27-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
28-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
27+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
28+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
2929
* Note that network connection is required for this license to work.
3030
*/
3131

32-
/* When using your own license, please uncomment the following lines and fill in your own information. */
33-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
34-
32+
/* When using your own license, uncomment the following line and specify your Organization ID. */
33+
3534
// Dynamsoft.DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
36-
// Dynamsoft.DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
37-
// Dynamsoft.DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
38-
// Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
39-
35+
36+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
37+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
38+
4039
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
41-
40+
4241
// Dynamsoft.DBR.BarcodeReader.productKeys = "YOUR-PRODUCT-KEY";
43-
42+
4443
/** LICENSE ALERT - THE END */
4544

4645
// reader for decoding picture

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import DBR from "dynamsoft-javascript-barcode";
22

33
/** LICENSE ALERT - README
4-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
5-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
4+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
5+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
66
* Note that network connection is required for this license to work.
77
*/
88

9-
/* When using your own license, please uncomment the following lines and fill in your own information. */
10-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
9+
/* When using your own license, uncomment the following line and specify your Organization ID. */
1110

1211
// DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
13-
// DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
14-
// DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
15-
// DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
12+
13+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
14+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
1615

1716
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
1817

1.hello-world/4.read-video-react/src/dbr.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import DBR from "dynamsoft-javascript-barcode";
22

33
/** LICENSE ALERT - README
4-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
5-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
4+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
5+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
66
* Note that network connection is required for this license to work.
77
*/
88

9-
/* When using your own license, please uncomment the following lines and fill in your own information. */
10-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
9+
/* When using your own license, uncomment the following line and specify your Organization ID. */
1110

1211
// DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
13-
// DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
14-
// DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
15-
// DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
12+
13+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
14+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
1615

1716
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
1817

1.hello-world/5.read-video-vue/src/dbr.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import DBR from "dynamsoft-javascript-barcode";
22

33
/** LICENSE ALERT - README
4-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
5-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
4+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
5+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
66
* Note that network connection is required for this license to work.
77
*/
88

9-
/* When using your own license, please uncomment the following lines and fill in your own information. */
10-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
9+
/* When using your own license, uncomment the following line and specify your Organization ID. */
1110

1211
// DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
13-
// DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
14-
// DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
15-
// DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
12+
13+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
14+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
1615

1716
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
1817

2.ui-tweaking/1.read-video-show-result.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,37 @@
99
</head>
1010

1111
<body>
12-
<button id="backToNormal" hidden>Exit</button>
1312
<h2>Use Default Camera UI</h2>
1413
<input type="text" id="result" title="Double click to clear!" readonly="true" class="latest-result"
1514
placeholder="The Last Read Barcode">
1615
<div id="UIElement">
17-
<span id='lib-load' style='font-size:x-large' hidden>Loading Library...</span>
16+
<span id='lib-load' style='font-size:x-large' hidden>Loading Library...</span><br />
17+
<button id="showScanner" hidden>Show The Scanner</button>
1818
</div>
1919
<div>
2020
<span style="float:left">All Results:</span><br />
2121
<div id="results"></div>
2222
</div>
2323
<script>
2424
/** LICENSE ALERT - README
25-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
26-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
25+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
26+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
2727
* Note that network connection is required for this license to work.
2828
*/
2929

30-
/* When using your own license, please uncomment the following lines and fill in your own information. */
31-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
32-
30+
/* When using your own license, uncomment the following line and specify your Organization ID. */
31+
3332
// Dynamsoft.DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
34-
// Dynamsoft.DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
35-
// Dynamsoft.DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
36-
// Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
37-
33+
34+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
35+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
36+
3837
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
39-
38+
4039
// Dynamsoft.DBR.BarcodeReader.productKeys = "YOUR-PRODUCT-KEY";
41-
42-
/** LICENSE ALERT - THE END */
4340

41+
/** LICENSE ALERT - THE END */
42+
4443
// scanner for decoding video
4544
let scanner = null;
4645
window.onload = async function () {
@@ -56,12 +55,16 @@ <h2>Use Default Camera UI</h2>
5655
document.getElementById('result').addEventListener('dblclick', async () => {
5756
document.getElementById('result').value = "";
5857
});
58+
document.getElementById('showScanner').addEventListener('click', () => {
59+
if (scanner) scanner.show();
60+
});
5961
};
6062
// decode video from camera
6163
async function startBarcodeScanner() {
6264
try {
6365
scanner = scanner || await Dynamsoft.DBR.BarcodeScanner.createInstance();
6466
document.getElementById('lib-load').hidden = true;
67+
document.getElementById('showScanner').hidden = false;
6568
scanner.onFrameRead = (_results) => {
6669
for (let result of _results) {
6770
let newElements = [];
@@ -97,10 +100,11 @@ <h2>Use Default Camera UI</h2>
97100
</script>
98101
</body>
99102
<style>
100-
button#backToNormal {
103+
button#showScanner {
101104
position: absolute;
102-
z-index: 10000000;
103-
top: 5vh;
105+
width: 50%;
106+
left: 25%;
107+
top: 30%;
104108
}
105109

106110
body {

2.ui-tweaking/2.read-video-no-extra-control.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@
99
</head>
1010

1111
<body>
12+
<h2>Hide Built-in Controllers</h2>
1213
<input type="text" id="result" readonly="true" class="latest-result" placeholder="The Last Read Barcode">
1314
<div id="UIElement">
1415
<span id='lib-load' style='font-size:x-large' hidden>Loading Library...</span>
1516
</div>
1617
<script>
1718
/** LICENSE ALERT - README
18-
* The library requires a license to work, the APIs organizationID and handshakeCode specify how to acquire a license.
19-
* If nothing is specified, a 7-day (public) trial license will be used by default which is the case in this sample.
19+
* The library requires a license to work, you use the API organizationID to tell the program where to fetch your license.
20+
* If the Organizaion ID is not specified, a 7-day (public) trial license will be used by default which is the case in this sample.
2021
* Note that network connection is required for this license to work.
2122
*/
2223

23-
/* When using your own license, please uncomment the following lines and fill in your own information. */
24-
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
24+
/* When using your own license, uncomment the following line and specify your Organization ID. */
2525

2626
// Dynamsoft.DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";
27-
// Dynamsoft.DBR.BarcodeReader.handshakeCode = "A-SPECIFIC-HANDSHAKECODE";
28-
// Dynamsoft.DBR.BarcodeReader.sessionPassword = "PASSWORD-TO-PROTECT-YOUR-LICENSE"; // Important field to protect your license.
29-
// Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-LTS", "YOUR-OWN-STANDBY-LTS"]; // Ignore this line if you are using Dynamsoft-hosting LTS
27+
28+
/* If you don't have a license yet, you can request a trial on this page: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js&utm_source=github */
29+
/* For more information, please refer to https://www.dynamsoft.com/license-tracking/docs/about/licensefaq.html?ver=latest#how-to-use-a-trackable-license. */
3030

3131
/* The API "productKeys" is an alternative way to license the library, the major difference is that it does not require a network. Contact support@dynamsoft.com for more information. */
3232

3333
// Dynamsoft.DBR.BarcodeReader.productKeys = "YOUR-PRODUCT-KEY";
3434

3535
/** LICENSE ALERT - THE END */
36-
36+
3737
// scanner for decoding video
3838
let scanner = null;
3939
window.onload = async function () {

0 commit comments

Comments
 (0)