Skip to content

Commit d06df8d

Browse files
authored
Merge pull request #54 from Keillion/master
7.3.0.2
2 parents 1baa2b8 + d12f66e commit d06df8d

Some content is hidden

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

41 files changed

+323
-239
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!DOCTYPE html>
2020
<html>
2121
<body>
22-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
22+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
2323
<script>
2424
let scanner = null;
2525
(async()=>{
@@ -181,7 +181,7 @@ Create an HTML file with the following content. Deploy it to your web server if
181181
<html>
182182
<body>
183183
<!-- Please visit https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx to get a trial license. -->
184-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
184+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
185185
<script>
186186
let scanner = null;
187187
(async()=>{
@@ -240,13 +240,13 @@ Now, take a look at the sample code. You can find that there is nothing but two
240240
* The following script includes the core library in the application via a [jsDelivr](https://www.jsdelivr.com/) CDN
241241

242242
```javascript
243-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
243+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
244244
```
245245

246246
The same can be done with other CDNs like `unpkg`
247247

248248
```javascript
249-
<script src="https://unpkg.com/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
249+
<script src="https://unpkg.com/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
250250
```
251251

252252
> **NOTE**: Since we do change the library a bit in each release, to make sure your application doesn't get interrupted by automatic updates, use a specific version in your production environment as shown above. Using a general major version like `@7` is not recommended.
@@ -393,7 +393,7 @@ The following introduces the 3rd way. Check out the following code on how it's d
393393
<video class="dbrScanner-video" playsinline="true"></video>
394394
</div>
395395
<!-- Please visit https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx to get a trial license. -->
396-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
396+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
397397
<script>
398398
let scanner = null;
399399
(async()=>{
@@ -616,9 +616,9 @@ On your server put the following files in the same directory.
616616
> * Java&trade; EE web app: [web.xml](https://github.com/dynamsoft-dbr/javascript-barcode/blob/dac614f8033661901d85381dfaff8d612115862a/documents/conf/web.xml)
617617
> * Node.js: [npm mime](https://github.com/broofa/node-mime)
618618
619-
* **Step three**: Configure the engineResourcePath
619+
* **Step three**: [Optional] Configure the `engineResourcePath`
620620

621-
The `engineResourcePath` need to be set before `loadWasm`.
621+
If the resource files like the `wasm` files are not placed in the same directory as the file `dbr.min.js`. Then you will need to specify the path with the API `engineResourcePath`. Note that it must be set before `loadWasm` or `createInstance`.
622622
```js
623623
Dynamsoft.BarcodeReader.engineResourcePath = "url/to/the/dir/";
624624
```
@@ -634,7 +634,7 @@ https://www.dynamsoft.com/Products/Dynamic-Barcode-Reader-News.aspx#javascript
634634
* If you are using a CDN, just make sure to change the version number in the URL like this
635635

636636
```javascript
637-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
637+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
638638
```
639639

640640
* If you have deployed the library files on your own server, you'll need to replace the old files with the ones from the new version. Download the latest version [here](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).
@@ -687,7 +687,7 @@ It takes several steps to activate a purchased license, the following steps assu
687687

688688
```html
689689
<!-- Please visit https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx to get a trial license. -->
690-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
690+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
691691
```
692692

693693
To use your license, you simply need to replace `PRODUCT-KEYS` with it.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function La() {
256256
e.HEAPF32 = Ja = new Float32Array(buffer);
257257
e.HEAPF64 = Ka = new Float64Array(buffer);
258258
}
259-
var qa = 1539856;
259+
var qa = 1540656;
260260
assert(!0, "stack must start aligned");
261261
assert(!0, "heap must start aligned");
262262
e.TOTAL_STACK && assert(5242880 === e.TOTAL_STACK, "the stack size can no longer be determined at runtime");
@@ -271,9 +271,9 @@ wa && (buffer = wa.buffer);
271271
Ma = buffer.byteLength;
272272
assert(0 === Ma % 65536);
273273
La();
274-
p[qa >> 2] = 6782752;
274+
p[qa >> 2] = 6783552;
275275
function Na() {
276-
var a = y[384969], b = y[384970];
276+
var a = y[385169], b = y[385170];
277277
34821223 == a && 2310721022 == b || m("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" + b.toString(16) + " " + a.toString(16));
278278
1668509029 !== p[0] && m("Runtime error: The application has corrupted its heap memory area (address zero)!");
279279
}
@@ -2434,7 +2434,7 @@ function ae(a) {
24342434
ae.ja = c;
24352435
return ae.ja;
24362436
}
2437-
Da("GMT", 1539760, 4);
2437+
Da("GMT", 1540560, 4);
24382438
function be() {
24392439
function a(a) {
24402440
return (a = a.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? a[1] : "GMT";
@@ -3420,7 +3420,7 @@ var Z = e.asm({}, {ClassHandle:Nc, ClassHandle_clone:Vc, ClassHandle_delete:Wc,
34203420
return eval(x(a)) | 0;
34213421
}, emscripten_run_script_string:Y, ensureOverloadTable:dd, exposePublicSymbol:ed, extendError:Ic, fabs:Xa, fabsf:Xa, floatReadValueFromPointer:Qd, floor:$a, flushPendingDeletes:$c, genericPointerToWireType:jd, getBasestPointer:wd, getInheritedInstance:xd, getInheritedInstanceCount:rd, getLiveInheritedInstances:td, getShiftFromSize:Ac, getTypeName:Dd, get_first_emval:Od, getenv:ae, heap32VectorToArray:Jd, init_ClassHandle:bd, init_RegisteredPointer:Ad, init_embind:vd, init_emval:Pd, integerReadValueFromPointer:Rd,
34223422
jsStackTrace:qb, localtime:function(a) {
3423-
return fe(a, 1539712);
3423+
return fe(a, 1540512);
34243424
}, localtime_r:fe, makeClassHandle:yd, makeLegalFunctionName:Gc, memcpy:function(a, b, c) {
34253425
a |= 0;
34263426
b |= 0;
@@ -4424,8 +4424,8 @@ function wf() {
44244424
}
44254425
if (!(0 < bb)) {
44264426
assert(!0);
4427-
y[384969] = 34821223;
4428-
y[384970] = 2310721022;
4427+
y[385169] = 34821223;
4428+
y[385170] = 2310721022;
44294429
if (e.preRun) {
44304430
for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) {
44314431
Ua();
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function La() {
256256
e.HEAPF32 = Ja = new Float32Array(buffer);
257257
e.HEAPF64 = Ka = new Float64Array(buffer);
258258
}
259-
var qa = 884944;
259+
var qa = 885744;
260260
assert(!0, "stack must start aligned");
261261
assert(!0, "heap must start aligned");
262262
e.TOTAL_STACK && assert(5242880 === e.TOTAL_STACK, "the stack size can no longer be determined at runtime");
@@ -271,9 +271,9 @@ wa && (buffer = wa.buffer);
271271
Ma = buffer.byteLength;
272272
assert(0 === Ma % 65536);
273273
La();
274-
p[qa >> 2] = 6127840;
274+
p[qa >> 2] = 6128640;
275275
function Na() {
276-
var a = y[221241], b = y[221242];
276+
var a = y[221441], b = y[221442];
277277
34821223 == a && 2310721022 == b || m("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" + b.toString(16) + " " + a.toString(16));
278278
1668509029 !== p[0] && m("Runtime error: The application has corrupted its heap memory area (address zero)!");
279279
}
@@ -2434,7 +2434,7 @@ function ae(a) {
24342434
ae.ja = c;
24352435
return ae.ja;
24362436
}
2437-
Da("GMT", 884848, 4);
2437+
Da("GMT", 885648, 4);
24382438
function be() {
24392439
function a(a) {
24402440
return (a = a.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? a[1] : "GMT";
@@ -3420,7 +3420,7 @@ var Z = e.asm({}, {ClassHandle:Nc, ClassHandle_clone:Vc, ClassHandle_delete:Wc,
34203420
return eval(x(a)) | 0;
34213421
}, emscripten_run_script_string:Y, ensureOverloadTable:dd, exposePublicSymbol:ed, extendError:Ic, fabs:Xa, fabsf:Xa, floatReadValueFromPointer:Qd, floor:$a, flushPendingDeletes:$c, genericPointerToWireType:jd, getBasestPointer:wd, getInheritedInstance:xd, getInheritedInstanceCount:rd, getLiveInheritedInstances:td, getShiftFromSize:Ac, getTypeName:Dd, get_first_emval:Od, getenv:ae, heap32VectorToArray:Jd, init_ClassHandle:bd, init_RegisteredPointer:Ad, init_embind:vd, init_emval:Pd, integerReadValueFromPointer:Rd,
34223422
jsStackTrace:qb, localtime:function(a) {
3423-
return fe(a, 884800);
3423+
return fe(a, 885600);
34243424
}, localtime_r:fe, makeClassHandle:yd, makeLegalFunctionName:Gc, memcpy:function(a, b, c) {
34253425
a |= 0;
34263426
b |= 0;
@@ -4424,8 +4424,8 @@ function wf() {
44244424
}
44254425
if (!(0 < bb)) {
44264426
assert(!0);
4427-
y[221241] = 34821223;
4428-
y[221242] = 2310721022;
4427+
y[221441] = 34821223;
4428+
y[221442] = 2310721022;
44294429
if (e.preRun) {
44304430
for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) {
44314431
Ua();
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dbr.browser.mjs

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

dist/dbr.d.ts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @website http://www.dynamsoft.com
55
* @preserve Copyright 2020, Dynamsoft Corporation
66
* @author Dynamsoft
7-
* @version 7.3.0.1 (js 20200103)
7+
* @version 7.3.0.2 (js 20200214)
88
* @fileoverview Dynamsoft JavaScript Library for Barcode Reader
99
* More info on DBR JS: https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx
1010
*/
@@ -363,6 +363,10 @@ export declare class BarcodeReader {
363363
* Determine if the decoding module has been loaded successfully.
364364
*/
365365
static isLoaded(): boolean;
366+
/**
367+
* Indicates whether the instance has been destroyed.
368+
*/
369+
bDestroyed: boolean;
366370
/**
367371
* Manually load and compile the decoding module. Used for preloading to avoid taking too long for lazy loading.
368372
*/
@@ -618,6 +622,23 @@ export declare class BarcodeScanner extends BarcodeReader {
618622
* @ignore
619623
*/
620624
UIElement: HTMLElement;
625+
/**
626+
* Get the HTML element that contains your scanner object.
627+
*/
628+
getUIElement(): HTMLElement;
629+
/**
630+
* set the HTML element that contains your scanner object.
631+
* ```html
632+
* <video class="dbrScanner-video" playsinline="true"></video>
633+
* <script>
634+
* let scanner = await Dynamsoft.BarcodeScanner.createInstance();
635+
* scanner.setUIElement(document.getElementByClass("dbrScanner-video")[0]);
636+
* await scanner.show();
637+
* </script>
638+
* ```
639+
* @param element
640+
*/
641+
setUIElement(elementOrUrl: HTMLElement | string): Promise<void>;
621642
/**
622643
* @ignore
623644
*/
@@ -902,23 +923,6 @@ export declare class BarcodeScanner extends BarcodeReader {
902923
* @param settings
903924
*/
904925
updateScanSettings(settings: ScannerConfig): Promise<void>;
905-
/**
906-
* Get the HTML element that contains your scanner object.
907-
*/
908-
getUIElement(): HTMLElement;
909-
/**
910-
* set the HTML element that contains your scanner object.
911-
* ```html
912-
* <video class="dbrScanner-video" playsinline="true"></video>
913-
* <script>
914-
* let scanner = await Dynamsoft.BarcodeScanner.createInstance();
915-
* scanner.setUIElement(document.getElementByClass("dbrScanner-video")[0]);
916-
* await scanner.show();
917-
* </script>
918-
* ```
919-
* @param element
920-
*/
921-
setUIElement(elementOrUrl: HTMLElement | string): Promise<void>;
922926
/**
923927
* Get current video settings of the BarcodeScanner object and saves it into a struct.
924928
*/

0 commit comments

Comments
 (0)