@yoobic/yobi 8.2.0-4 → 8.2.0-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,7 +14,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
14
14
|
* @license
|
|
15
15
|
*
|
|
16
16
|
* Scandit Barcode Scanner SDK for the Web
|
|
17
|
-
* v. 5.11.
|
|
17
|
+
* v. 5.11.1
|
|
18
18
|
*
|
|
19
19
|
* Copyright © 2022 Scandit AG. All Rights Reserved.
|
|
20
20
|
*
|
|
@@ -5102,8 +5102,8 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
5102
5102
|
// wasmJSVersion is globally defined inside scandit-engine-sdk.min.js
|
|
5103
5103
|
const wasmJSVersion = (_self$wasmJSVersion = self.wasmJSVersion) !== null && _self$wasmJSVersion !== void 0 ? _self$wasmJSVersion : "undefined"; // istanbul ignore if
|
|
5104
5104
|
|
|
5105
|
-
if (wasmJSVersion !== "5.11.
|
|
5106
|
-
log("error", "The Scandit Data Capture library JS file found at ".concat(jsURI, " seems invalid: ") + "expected version doesn't match (received: ".concat(wasmJSVersion, ", expected: ", "5.11.
|
|
5105
|
+
if (wasmJSVersion !== "5.11.1") {
|
|
5106
|
+
log("error", "The Scandit Data Capture library JS file found at ".concat(jsURI, " seems invalid: ") + "expected version doesn't match (received: ".concat(wasmJSVersion, ", expected: ", "5.11.1", "). ") + "Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.");
|
|
5107
5107
|
}
|
|
5108
5108
|
|
|
5109
5109
|
if (typeof self.WebAssembly.instantiateStreaming === "function") {
|
|
@@ -5496,10 +5496,10 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
5496
5496
|
let cdnURI = false;
|
|
5497
5497
|
|
|
5498
5498
|
if (/^https?:\/\/([^\/.]*\.)*cdn.jsdelivr.net\//.test(libraryLocation)) {
|
|
5499
|
-
libraryLocation = "https://cdn.jsdelivr.net/npm/scandit-sdk@5.11.
|
|
5499
|
+
libraryLocation = "https://cdn.jsdelivr.net/npm/scandit-sdk@5.11.1/build/";
|
|
5500
5500
|
cdnURI = true;
|
|
5501
5501
|
} else if (/^https?:\/\/([^\/.]*\.)*unpkg.com\//.test(libraryLocation)) {
|
|
5502
|
-
libraryLocation = "https://unpkg.com/scandit-sdk@5.11.
|
|
5502
|
+
libraryLocation = "https://unpkg.com/scandit-sdk@5.11.1/build/";
|
|
5503
5503
|
cdnURI = true;
|
|
5504
5504
|
}
|
|
5505
5505
|
|
|
@@ -5521,8 +5521,8 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
5521
5521
|
}
|
|
5522
5522
|
|
|
5523
5523
|
return {
|
|
5524
|
-
jsURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".min.js?v=5.11.
|
|
5525
|
-
wasmURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".wasm?v=5.11.
|
|
5524
|
+
jsURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".min.js?v=5.11.1"),
|
|
5525
|
+
wasmURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".wasm?v=5.11.1")
|
|
5526
5526
|
};
|
|
5527
5527
|
}
|
|
5528
5528
|
|
|
@@ -5733,8 +5733,8 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
5733
5733
|
});
|
|
5734
5734
|
}
|
|
5735
5735
|
|
|
5736
|
-
function instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback) {
|
|
5737
|
-
verifiedWasmFetch(wasmURI, textRecognition, simdSupport, true).then(function (response) {
|
|
5736
|
+
function instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback, existingResponse) {
|
|
5737
|
+
(existingResponse != null ? Promise.resolve(existingResponse) : verifiedWasmFetch(wasmURI, textRecognition, simdSupport, true)).then(function (response) {
|
|
5738
5738
|
return response.arrayBuffer();
|
|
5739
5739
|
}).then(function (bytes) {
|
|
5740
5740
|
return self.WebAssembly.instantiate(bytes, importObject).then(function (results) {
|
|
@@ -5756,7 +5756,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
5756
5756
|
}).catch(function (error) {
|
|
5757
5757
|
log("warn", error);
|
|
5758
5758
|
log("warn", "WebAssembly streaming compile failed. " + "Falling back to ArrayBuffer instantiation (this will make things slower)");
|
|
5759
|
-
instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback);
|
|
5759
|
+
instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback, response);
|
|
5760
5760
|
});
|
|
5761
5761
|
}).catch(
|
|
5762
5762
|
/* istanbul ignore next */
|
|
@@ -10192,6 +10192,8 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
10192
10192
|
|
|
10193
10193
|
_defineProperty(this, "triggerZoomMoveListener", this.triggerZoomMove.bind(this));
|
|
10194
10194
|
|
|
10195
|
+
_defineProperty(this, "checkCameraVideoStreamAccessIfVisibleListener", this.checkCameraVideoStreamAccessIfVisible.bind(this));
|
|
10196
|
+
|
|
10195
10197
|
_defineProperty(this, "cameraType", void 0);
|
|
10196
10198
|
|
|
10197
10199
|
_defineProperty(this, "selectedCameraSettings", void 0);
|
|
@@ -10464,11 +10466,12 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
10464
10466
|
this.activeCamera = undefined;
|
|
10465
10467
|
|
|
10466
10468
|
if (!(this.mediaStream != null)) {
|
|
10467
|
-
_context4.next =
|
|
10469
|
+
_context4.next = 14;
|
|
10468
10470
|
break;
|
|
10469
10471
|
}
|
|
10470
10472
|
|
|
10471
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Stop camera video stream access (
|
|
10473
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Stop camera video stream access".concat(cameraInitializationFailure ? " (abort access detection)" : "", ":"), this.mediaStream);
|
|
10474
|
+
document.removeEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
10472
10475
|
window.clearTimeout(this.cameraAccessTimeout);
|
|
10473
10476
|
window.clearInterval(this.videoMetadataCheckInterval);
|
|
10474
10477
|
window.clearTimeout(this.getCapabilitiesTimeout);
|
|
@@ -10499,7 +10502,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
10499
10502
|
}, 0);
|
|
10500
10503
|
}));
|
|
10501
10504
|
|
|
10502
|
-
case
|
|
10505
|
+
case 14:
|
|
10503
10506
|
case "end":
|
|
10504
10507
|
return _context4.stop();
|
|
10505
10508
|
}
|
|
@@ -11101,6 +11104,15 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11101
11104
|
this.updateActiveCameraCurrentResolution(this.activeCamera);
|
|
11102
11105
|
}
|
|
11103
11106
|
}
|
|
11107
|
+
}, {
|
|
11108
|
+
key: "checkCameraVideoStreamAccessIfVisible",
|
|
11109
|
+
value: function checkCameraVideoStreamAccessIfVisible() {
|
|
11110
|
+
if (document.visibilityState === "visible") {
|
|
11111
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is visible again, waiting for camera video stream start...");
|
|
11112
|
+
document.removeEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11113
|
+
this.setCameraAccessTimeout();
|
|
11114
|
+
}
|
|
11115
|
+
}
|
|
11104
11116
|
}, {
|
|
11105
11117
|
key: "videoTrackEndedRecovery",
|
|
11106
11118
|
value: function () {
|
|
@@ -11109,25 +11121,37 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11109
11121
|
while (1) {
|
|
11110
11122
|
switch (_context15.prev = _context15.next) {
|
|
11111
11123
|
case 0:
|
|
11112
|
-
_context15.prev = 0;
|
|
11113
11124
|
exports.Logger.log(exports.Logger.Level.DEBUG, 'Detected video track "ended" event, try to reinitialize camera');
|
|
11114
|
-
_context15.next = 4;
|
|
11115
|
-
return this.reinitializeCamera();
|
|
11116
11125
|
|
|
11117
|
-
|
|
11118
|
-
|
|
11126
|
+
if (!(document.visibilityState !== "visible")) {
|
|
11127
|
+
_context15.next = 6;
|
|
11128
|
+
break;
|
|
11129
|
+
}
|
|
11130
|
+
|
|
11131
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is currently not visible, delay camera reinitialization until visible");
|
|
11132
|
+
document.addEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11133
|
+
_context15.next = 13;
|
|
11119
11134
|
break;
|
|
11120
11135
|
|
|
11121
11136
|
case 6:
|
|
11122
11137
|
_context15.prev = 6;
|
|
11123
|
-
_context15.
|
|
11138
|
+
_context15.next = 9;
|
|
11139
|
+
return this.reinitializeCamera();
|
|
11124
11140
|
|
|
11125
|
-
case
|
|
11141
|
+
case 9:
|
|
11142
|
+
_context15.next = 13;
|
|
11143
|
+
break;
|
|
11144
|
+
|
|
11145
|
+
case 11:
|
|
11146
|
+
_context15.prev = 11;
|
|
11147
|
+
_context15.t0 = _context15["catch"](6);
|
|
11148
|
+
|
|
11149
|
+
case 13:
|
|
11126
11150
|
case "end":
|
|
11127
11151
|
return _context15.stop();
|
|
11128
11152
|
}
|
|
11129
11153
|
}
|
|
11130
|
-
}, _callee15, this, [[
|
|
11154
|
+
}, _callee15, this, [[6, 11]]);
|
|
11131
11155
|
}));
|
|
11132
11156
|
|
|
11133
11157
|
function videoTrackEndedRecovery() {
|
|
@@ -11150,7 +11174,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11150
11174
|
break;
|
|
11151
11175
|
}
|
|
11152
11176
|
|
|
11153
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Detected video track \"".concat(event.type, "\" event, delay video stream access detection"));
|
|
11177
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Detected video track \"".concat(event.type, "\" event, delay camera video stream access detection"));
|
|
11154
11178
|
this.setCameraAccessTimeout();
|
|
11155
11179
|
return _context16.abrupt("return");
|
|
11156
11180
|
|
|
@@ -11751,7 +11775,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11751
11775
|
|
|
11752
11776
|
case 11:
|
|
11753
11777
|
stream = _context27.sent;
|
|
11754
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Camera accessed, waiting for video stream start..."); // Detect weird browser behaviour that on unsupported resolution returns a 2x2 video instead
|
|
11778
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Camera accessed, waiting for camera video stream start..."); // Detect weird browser behaviour that on unsupported resolution returns a 2x2 video instead
|
|
11755
11779
|
|
|
11756
11780
|
if (!(typeof stream.getTracks()[0].getSettings === "function")) {
|
|
11757
11781
|
_context27.next = 22;
|
|
@@ -11847,13 +11871,24 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11847
11871
|
while (1) {
|
|
11848
11872
|
switch (_context28.prev = _context28.next) {
|
|
11849
11873
|
case 0:
|
|
11850
|
-
|
|
11874
|
+
if (!(document.visibilityState !== "visible")) {
|
|
11875
|
+
_context28.next = 5;
|
|
11876
|
+
break;
|
|
11877
|
+
}
|
|
11878
|
+
|
|
11879
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is currently not visible, delay camera video stream access detection");
|
|
11880
|
+
document.addEventListener("visibilitychange", _this9.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11881
|
+
_context28.next = 8;
|
|
11882
|
+
break;
|
|
11883
|
+
|
|
11884
|
+
case 5:
|
|
11885
|
+
_context28.next = 7;
|
|
11851
11886
|
return _this9.stopStream(true);
|
|
11852
11887
|
|
|
11853
|
-
case
|
|
11888
|
+
case 7:
|
|
11854
11889
|
(_this9$cameraAccessRe = _this9.cameraAccessRejectCallback) === null || _this9$cameraAccessRe === void 0 ? void 0 : _this9$cameraAccessRe.call(_this9, new CustomError(CameraManager.notReadableErrorParameters));
|
|
11855
11890
|
|
|
11856
|
-
case
|
|
11891
|
+
case 8:
|
|
11857
11892
|
case "end":
|
|
11858
11893
|
return _context28.stop();
|
|
11859
11894
|
}
|
|
@@ -16438,7 +16473,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
16438
16473
|
return assertUnreachable(schema);
|
|
16439
16474
|
}
|
|
16440
16475
|
|
|
16441
|
-
|
|
16476
|
+
/******************************************************************************
|
|
16442
16477
|
Copyright (c) Microsoft Corporation.
|
|
16443
16478
|
|
|
16444
16479
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -17831,7 +17866,7 @@ var browser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
17831
17866
|
while (1) {
|
|
17832
17867
|
switch (_context.prev = _context.next) {
|
|
17833
17868
|
case 0:
|
|
17834
|
-
exports.Logger.log(exports.Logger.Level.INFO, "Scandit Web SDK version: 5.11.
|
|
17869
|
+
exports.Logger.log(exports.Logger.Level.INFO, "Scandit Web SDK version: 5.11.1");
|
|
17835
17870
|
exports.configurePhase = "started";
|
|
17836
17871
|
browserCompatibility = exports.BrowserHelper.checkBrowserCompatibility();
|
|
17837
17872
|
|
|
@@ -10,7 +10,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10
10
|
* @license
|
|
11
11
|
*
|
|
12
12
|
* Scandit Barcode Scanner SDK for the Web
|
|
13
|
-
* v. 5.11.
|
|
13
|
+
* v. 5.11.1
|
|
14
14
|
*
|
|
15
15
|
* Copyright © 2022 Scandit AG. All Rights Reserved.
|
|
16
16
|
*
|
|
@@ -5098,8 +5098,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5098
5098
|
// wasmJSVersion is globally defined inside scandit-engine-sdk.min.js
|
|
5099
5099
|
const wasmJSVersion = (_self$wasmJSVersion = self.wasmJSVersion) !== null && _self$wasmJSVersion !== void 0 ? _self$wasmJSVersion : "undefined"; // istanbul ignore if
|
|
5100
5100
|
|
|
5101
|
-
if (wasmJSVersion !== "5.11.
|
|
5102
|
-
log("error", "The Scandit Data Capture library JS file found at ".concat(jsURI, " seems invalid: ") + "expected version doesn't match (received: ".concat(wasmJSVersion, ", expected: ", "5.11.
|
|
5101
|
+
if (wasmJSVersion !== "5.11.1") {
|
|
5102
|
+
log("error", "The Scandit Data Capture library JS file found at ".concat(jsURI, " seems invalid: ") + "expected version doesn't match (received: ".concat(wasmJSVersion, ", expected: ", "5.11.1", "). ") + "Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.");
|
|
5103
5103
|
}
|
|
5104
5104
|
|
|
5105
5105
|
if (typeof self.WebAssembly.instantiateStreaming === "function") {
|
|
@@ -5492,10 +5492,10 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5492
5492
|
let cdnURI = false;
|
|
5493
5493
|
|
|
5494
5494
|
if (/^https?:\/\/([^\/.]*\.)*cdn.jsdelivr.net\//.test(libraryLocation)) {
|
|
5495
|
-
libraryLocation = "https://cdn.jsdelivr.net/npm/scandit-sdk@5.11.
|
|
5495
|
+
libraryLocation = "https://cdn.jsdelivr.net/npm/scandit-sdk@5.11.1/build/";
|
|
5496
5496
|
cdnURI = true;
|
|
5497
5497
|
} else if (/^https?:\/\/([^\/.]*\.)*unpkg.com\//.test(libraryLocation)) {
|
|
5498
|
-
libraryLocation = "https://unpkg.com/scandit-sdk@5.11.
|
|
5498
|
+
libraryLocation = "https://unpkg.com/scandit-sdk@5.11.1/build/";
|
|
5499
5499
|
cdnURI = true;
|
|
5500
5500
|
}
|
|
5501
5501
|
|
|
@@ -5517,8 +5517,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5517
5517
|
}
|
|
5518
5518
|
|
|
5519
5519
|
return {
|
|
5520
|
-
jsURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".min.js?v=5.11.
|
|
5521
|
-
wasmURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".wasm?v=5.11.
|
|
5520
|
+
jsURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".min.js?v=5.11.1"),
|
|
5521
|
+
wasmURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".wasm?v=5.11.1")
|
|
5522
5522
|
};
|
|
5523
5523
|
}
|
|
5524
5524
|
|
|
@@ -5729,8 +5729,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5729
5729
|
});
|
|
5730
5730
|
}
|
|
5731
5731
|
|
|
5732
|
-
function instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback) {
|
|
5733
|
-
verifiedWasmFetch(wasmURI, textRecognition, simdSupport, true).then(function (response) {
|
|
5732
|
+
function instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback, existingResponse) {
|
|
5733
|
+
(existingResponse != null ? Promise.resolve(existingResponse) : verifiedWasmFetch(wasmURI, textRecognition, simdSupport, true)).then(function (response) {
|
|
5734
5734
|
return response.arrayBuffer();
|
|
5735
5735
|
}).then(function (bytes) {
|
|
5736
5736
|
return self.WebAssembly.instantiate(bytes, importObject).then(function (results) {
|
|
@@ -5752,7 +5752,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5752
5752
|
}).catch(function (error) {
|
|
5753
5753
|
log("warn", error);
|
|
5754
5754
|
log("warn", "WebAssembly streaming compile failed. " + "Falling back to ArrayBuffer instantiation (this will make things slower)");
|
|
5755
|
-
instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback);
|
|
5755
|
+
instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback, response);
|
|
5756
5756
|
});
|
|
5757
5757
|
}).catch(
|
|
5758
5758
|
/* istanbul ignore next */
|
|
@@ -10188,6 +10188,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10188
10188
|
|
|
10189
10189
|
_defineProperty(this, "triggerZoomMoveListener", this.triggerZoomMove.bind(this));
|
|
10190
10190
|
|
|
10191
|
+
_defineProperty(this, "checkCameraVideoStreamAccessIfVisibleListener", this.checkCameraVideoStreamAccessIfVisible.bind(this));
|
|
10192
|
+
|
|
10191
10193
|
_defineProperty(this, "cameraType", void 0);
|
|
10192
10194
|
|
|
10193
10195
|
_defineProperty(this, "selectedCameraSettings", void 0);
|
|
@@ -10460,11 +10462,12 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10460
10462
|
this.activeCamera = undefined;
|
|
10461
10463
|
|
|
10462
10464
|
if (!(this.mediaStream != null)) {
|
|
10463
|
-
_context4.next =
|
|
10465
|
+
_context4.next = 14;
|
|
10464
10466
|
break;
|
|
10465
10467
|
}
|
|
10466
10468
|
|
|
10467
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Stop camera video stream access (
|
|
10469
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Stop camera video stream access".concat(cameraInitializationFailure ? " (abort access detection)" : "", ":"), this.mediaStream);
|
|
10470
|
+
document.removeEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
10468
10471
|
window.clearTimeout(this.cameraAccessTimeout);
|
|
10469
10472
|
window.clearInterval(this.videoMetadataCheckInterval);
|
|
10470
10473
|
window.clearTimeout(this.getCapabilitiesTimeout);
|
|
@@ -10495,7 +10498,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10495
10498
|
}, 0);
|
|
10496
10499
|
}));
|
|
10497
10500
|
|
|
10498
|
-
case
|
|
10501
|
+
case 14:
|
|
10499
10502
|
case "end":
|
|
10500
10503
|
return _context4.stop();
|
|
10501
10504
|
}
|
|
@@ -11097,6 +11100,15 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11097
11100
|
this.updateActiveCameraCurrentResolution(this.activeCamera);
|
|
11098
11101
|
}
|
|
11099
11102
|
}
|
|
11103
|
+
}, {
|
|
11104
|
+
key: "checkCameraVideoStreamAccessIfVisible",
|
|
11105
|
+
value: function checkCameraVideoStreamAccessIfVisible() {
|
|
11106
|
+
if (document.visibilityState === "visible") {
|
|
11107
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is visible again, waiting for camera video stream start...");
|
|
11108
|
+
document.removeEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11109
|
+
this.setCameraAccessTimeout();
|
|
11110
|
+
}
|
|
11111
|
+
}
|
|
11100
11112
|
}, {
|
|
11101
11113
|
key: "videoTrackEndedRecovery",
|
|
11102
11114
|
value: function () {
|
|
@@ -11105,25 +11117,37 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11105
11117
|
while (1) {
|
|
11106
11118
|
switch (_context15.prev = _context15.next) {
|
|
11107
11119
|
case 0:
|
|
11108
|
-
_context15.prev = 0;
|
|
11109
11120
|
exports.Logger.log(exports.Logger.Level.DEBUG, 'Detected video track "ended" event, try to reinitialize camera');
|
|
11110
|
-
_context15.next = 4;
|
|
11111
|
-
return this.reinitializeCamera();
|
|
11112
11121
|
|
|
11113
|
-
|
|
11114
|
-
|
|
11122
|
+
if (!(document.visibilityState !== "visible")) {
|
|
11123
|
+
_context15.next = 6;
|
|
11124
|
+
break;
|
|
11125
|
+
}
|
|
11126
|
+
|
|
11127
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is currently not visible, delay camera reinitialization until visible");
|
|
11128
|
+
document.addEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11129
|
+
_context15.next = 13;
|
|
11115
11130
|
break;
|
|
11116
11131
|
|
|
11117
11132
|
case 6:
|
|
11118
11133
|
_context15.prev = 6;
|
|
11119
|
-
_context15.
|
|
11134
|
+
_context15.next = 9;
|
|
11135
|
+
return this.reinitializeCamera();
|
|
11120
11136
|
|
|
11121
|
-
case
|
|
11137
|
+
case 9:
|
|
11138
|
+
_context15.next = 13;
|
|
11139
|
+
break;
|
|
11140
|
+
|
|
11141
|
+
case 11:
|
|
11142
|
+
_context15.prev = 11;
|
|
11143
|
+
_context15.t0 = _context15["catch"](6);
|
|
11144
|
+
|
|
11145
|
+
case 13:
|
|
11122
11146
|
case "end":
|
|
11123
11147
|
return _context15.stop();
|
|
11124
11148
|
}
|
|
11125
11149
|
}
|
|
11126
|
-
}, _callee15, this, [[
|
|
11150
|
+
}, _callee15, this, [[6, 11]]);
|
|
11127
11151
|
}));
|
|
11128
11152
|
|
|
11129
11153
|
function videoTrackEndedRecovery() {
|
|
@@ -11146,7 +11170,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11146
11170
|
break;
|
|
11147
11171
|
}
|
|
11148
11172
|
|
|
11149
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Detected video track \"".concat(event.type, "\" event, delay video stream access detection"));
|
|
11173
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Detected video track \"".concat(event.type, "\" event, delay camera video stream access detection"));
|
|
11150
11174
|
this.setCameraAccessTimeout();
|
|
11151
11175
|
return _context16.abrupt("return");
|
|
11152
11176
|
|
|
@@ -11747,7 +11771,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11747
11771
|
|
|
11748
11772
|
case 11:
|
|
11749
11773
|
stream = _context27.sent;
|
|
11750
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Camera accessed, waiting for video stream start..."); // Detect weird browser behaviour that on unsupported resolution returns a 2x2 video instead
|
|
11774
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Camera accessed, waiting for camera video stream start..."); // Detect weird browser behaviour that on unsupported resolution returns a 2x2 video instead
|
|
11751
11775
|
|
|
11752
11776
|
if (!(typeof stream.getTracks()[0].getSettings === "function")) {
|
|
11753
11777
|
_context27.next = 22;
|
|
@@ -11843,13 +11867,24 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11843
11867
|
while (1) {
|
|
11844
11868
|
switch (_context28.prev = _context28.next) {
|
|
11845
11869
|
case 0:
|
|
11846
|
-
|
|
11870
|
+
if (!(document.visibilityState !== "visible")) {
|
|
11871
|
+
_context28.next = 5;
|
|
11872
|
+
break;
|
|
11873
|
+
}
|
|
11874
|
+
|
|
11875
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is currently not visible, delay camera video stream access detection");
|
|
11876
|
+
document.addEventListener("visibilitychange", _this9.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11877
|
+
_context28.next = 8;
|
|
11878
|
+
break;
|
|
11879
|
+
|
|
11880
|
+
case 5:
|
|
11881
|
+
_context28.next = 7;
|
|
11847
11882
|
return _this9.stopStream(true);
|
|
11848
11883
|
|
|
11849
|
-
case
|
|
11884
|
+
case 7:
|
|
11850
11885
|
(_this9$cameraAccessRe = _this9.cameraAccessRejectCallback) === null || _this9$cameraAccessRe === void 0 ? void 0 : _this9$cameraAccessRe.call(_this9, new CustomError(CameraManager.notReadableErrorParameters));
|
|
11851
11886
|
|
|
11852
|
-
case
|
|
11887
|
+
case 8:
|
|
11853
11888
|
case "end":
|
|
11854
11889
|
return _context28.stop();
|
|
11855
11890
|
}
|
|
@@ -16434,7 +16469,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
16434
16469
|
return assertUnreachable(schema);
|
|
16435
16470
|
}
|
|
16436
16471
|
|
|
16437
|
-
|
|
16472
|
+
/******************************************************************************
|
|
16438
16473
|
Copyright (c) Microsoft Corporation.
|
|
16439
16474
|
|
|
16440
16475
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -17827,7 +17862,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
17827
17862
|
while (1) {
|
|
17828
17863
|
switch (_context.prev = _context.next) {
|
|
17829
17864
|
case 0:
|
|
17830
|
-
exports.Logger.log(exports.Logger.Level.INFO, "Scandit Web SDK version: 5.11.
|
|
17865
|
+
exports.Logger.log(exports.Logger.Level.INFO, "Scandit Web SDK version: 5.11.1");
|
|
17831
17866
|
exports.configurePhase = "started";
|
|
17832
17867
|
browserCompatibility = exports.BrowserHelper.checkBrowserCompatibility();
|
|
17833
17868
|
|
|
@@ -10,7 +10,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10
10
|
* @license
|
|
11
11
|
*
|
|
12
12
|
* Scandit Barcode Scanner SDK for the Web
|
|
13
|
-
* v. 5.11.
|
|
13
|
+
* v. 5.11.1
|
|
14
14
|
*
|
|
15
15
|
* Copyright © 2022 Scandit AG. All Rights Reserved.
|
|
16
16
|
*
|
|
@@ -5098,8 +5098,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5098
5098
|
// wasmJSVersion is globally defined inside scandit-engine-sdk.min.js
|
|
5099
5099
|
const wasmJSVersion = (_self$wasmJSVersion = self.wasmJSVersion) !== null && _self$wasmJSVersion !== void 0 ? _self$wasmJSVersion : "undefined"; // istanbul ignore if
|
|
5100
5100
|
|
|
5101
|
-
if (wasmJSVersion !== "5.11.
|
|
5102
|
-
log("error", "The Scandit Data Capture library JS file found at ".concat(jsURI, " seems invalid: ") + "expected version doesn't match (received: ".concat(wasmJSVersion, ", expected: ", "5.11.
|
|
5101
|
+
if (wasmJSVersion !== "5.11.1") {
|
|
5102
|
+
log("error", "The Scandit Data Capture library JS file found at ".concat(jsURI, " seems invalid: ") + "expected version doesn't match (received: ".concat(wasmJSVersion, ", expected: ", "5.11.1", "). ") + "Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.");
|
|
5103
5103
|
}
|
|
5104
5104
|
|
|
5105
5105
|
if (typeof self.WebAssembly.instantiateStreaming === "function") {
|
|
@@ -5492,10 +5492,10 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5492
5492
|
let cdnURI = false;
|
|
5493
5493
|
|
|
5494
5494
|
if (/^https?:\/\/([^\/.]*\.)*cdn.jsdelivr.net\//.test(libraryLocation)) {
|
|
5495
|
-
libraryLocation = "https://cdn.jsdelivr.net/npm/scandit-sdk@5.11.
|
|
5495
|
+
libraryLocation = "https://cdn.jsdelivr.net/npm/scandit-sdk@5.11.1/build/";
|
|
5496
5496
|
cdnURI = true;
|
|
5497
5497
|
} else if (/^https?:\/\/([^\/.]*\.)*unpkg.com\//.test(libraryLocation)) {
|
|
5498
|
-
libraryLocation = "https://unpkg.com/scandit-sdk@5.11.
|
|
5498
|
+
libraryLocation = "https://unpkg.com/scandit-sdk@5.11.1/build/";
|
|
5499
5499
|
cdnURI = true;
|
|
5500
5500
|
}
|
|
5501
5501
|
|
|
@@ -5517,8 +5517,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5517
5517
|
}
|
|
5518
5518
|
|
|
5519
5519
|
return {
|
|
5520
|
-
jsURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".min.js?v=5.11.
|
|
5521
|
-
wasmURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".wasm?v=5.11.
|
|
5520
|
+
jsURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".min.js?v=5.11.1"),
|
|
5521
|
+
wasmURI: "".concat(libraryLocation, "scandit-engine-sdk").concat(fileExtension, ".wasm?v=5.11.1")
|
|
5522
5522
|
};
|
|
5523
5523
|
}
|
|
5524
5524
|
|
|
@@ -5729,8 +5729,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5729
5729
|
});
|
|
5730
5730
|
}
|
|
5731
5731
|
|
|
5732
|
-
function instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback) {
|
|
5733
|
-
verifiedWasmFetch(wasmURI, textRecognition, simdSupport, true).then(function (response) {
|
|
5732
|
+
function instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback, existingResponse) {
|
|
5733
|
+
(existingResponse != null ? Promise.resolve(existingResponse) : verifiedWasmFetch(wasmURI, textRecognition, simdSupport, true)).then(function (response) {
|
|
5734
5734
|
return response.arrayBuffer();
|
|
5735
5735
|
}).then(function (bytes) {
|
|
5736
5736
|
return self.WebAssembly.instantiate(bytes, importObject).then(function (results) {
|
|
@@ -5752,7 +5752,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
5752
5752
|
}).catch(function (error) {
|
|
5753
5753
|
log("warn", error);
|
|
5754
5754
|
log("warn", "WebAssembly streaming compile failed. " + "Falling back to ArrayBuffer instantiation (this will make things slower)");
|
|
5755
|
-
instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback);
|
|
5755
|
+
instantiateWebAssembly(importObject, wasmURI, textRecognition, simdSupport, successCallback, response);
|
|
5756
5756
|
});
|
|
5757
5757
|
}).catch(
|
|
5758
5758
|
/* istanbul ignore next */
|
|
@@ -10188,6 +10188,8 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10188
10188
|
|
|
10189
10189
|
_defineProperty(this, "triggerZoomMoveListener", this.triggerZoomMove.bind(this));
|
|
10190
10190
|
|
|
10191
|
+
_defineProperty(this, "checkCameraVideoStreamAccessIfVisibleListener", this.checkCameraVideoStreamAccessIfVisible.bind(this));
|
|
10192
|
+
|
|
10191
10193
|
_defineProperty(this, "cameraType", void 0);
|
|
10192
10194
|
|
|
10193
10195
|
_defineProperty(this, "selectedCameraSettings", void 0);
|
|
@@ -10460,11 +10462,12 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10460
10462
|
this.activeCamera = undefined;
|
|
10461
10463
|
|
|
10462
10464
|
if (!(this.mediaStream != null)) {
|
|
10463
|
-
_context4.next =
|
|
10465
|
+
_context4.next = 14;
|
|
10464
10466
|
break;
|
|
10465
10467
|
}
|
|
10466
10468
|
|
|
10467
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Stop camera video stream access (
|
|
10469
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Stop camera video stream access".concat(cameraInitializationFailure ? " (abort access detection)" : "", ":"), this.mediaStream);
|
|
10470
|
+
document.removeEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
10468
10471
|
window.clearTimeout(this.cameraAccessTimeout);
|
|
10469
10472
|
window.clearInterval(this.videoMetadataCheckInterval);
|
|
10470
10473
|
window.clearTimeout(this.getCapabilitiesTimeout);
|
|
@@ -10495,7 +10498,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
10495
10498
|
}, 0);
|
|
10496
10499
|
}));
|
|
10497
10500
|
|
|
10498
|
-
case
|
|
10501
|
+
case 14:
|
|
10499
10502
|
case "end":
|
|
10500
10503
|
return _context4.stop();
|
|
10501
10504
|
}
|
|
@@ -11097,6 +11100,15 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11097
11100
|
this.updateActiveCameraCurrentResolution(this.activeCamera);
|
|
11098
11101
|
}
|
|
11099
11102
|
}
|
|
11103
|
+
}, {
|
|
11104
|
+
key: "checkCameraVideoStreamAccessIfVisible",
|
|
11105
|
+
value: function checkCameraVideoStreamAccessIfVisible() {
|
|
11106
|
+
if (document.visibilityState === "visible") {
|
|
11107
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is visible again, waiting for camera video stream start...");
|
|
11108
|
+
document.removeEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11109
|
+
this.setCameraAccessTimeout();
|
|
11110
|
+
}
|
|
11111
|
+
}
|
|
11100
11112
|
}, {
|
|
11101
11113
|
key: "videoTrackEndedRecovery",
|
|
11102
11114
|
value: function () {
|
|
@@ -11105,25 +11117,37 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11105
11117
|
while (1) {
|
|
11106
11118
|
switch (_context15.prev = _context15.next) {
|
|
11107
11119
|
case 0:
|
|
11108
|
-
_context15.prev = 0;
|
|
11109
11120
|
exports.Logger.log(exports.Logger.Level.DEBUG, 'Detected video track "ended" event, try to reinitialize camera');
|
|
11110
|
-
_context15.next = 4;
|
|
11111
|
-
return this.reinitializeCamera();
|
|
11112
11121
|
|
|
11113
|
-
|
|
11114
|
-
|
|
11122
|
+
if (!(document.visibilityState !== "visible")) {
|
|
11123
|
+
_context15.next = 6;
|
|
11124
|
+
break;
|
|
11125
|
+
}
|
|
11126
|
+
|
|
11127
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is currently not visible, delay camera reinitialization until visible");
|
|
11128
|
+
document.addEventListener("visibilitychange", this.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11129
|
+
_context15.next = 13;
|
|
11115
11130
|
break;
|
|
11116
11131
|
|
|
11117
11132
|
case 6:
|
|
11118
11133
|
_context15.prev = 6;
|
|
11119
|
-
_context15.
|
|
11134
|
+
_context15.next = 9;
|
|
11135
|
+
return this.reinitializeCamera();
|
|
11120
11136
|
|
|
11121
|
-
case
|
|
11137
|
+
case 9:
|
|
11138
|
+
_context15.next = 13;
|
|
11139
|
+
break;
|
|
11140
|
+
|
|
11141
|
+
case 11:
|
|
11142
|
+
_context15.prev = 11;
|
|
11143
|
+
_context15.t0 = _context15["catch"](6);
|
|
11144
|
+
|
|
11145
|
+
case 13:
|
|
11122
11146
|
case "end":
|
|
11123
11147
|
return _context15.stop();
|
|
11124
11148
|
}
|
|
11125
11149
|
}
|
|
11126
|
-
}, _callee15, this, [[
|
|
11150
|
+
}, _callee15, this, [[6, 11]]);
|
|
11127
11151
|
}));
|
|
11128
11152
|
|
|
11129
11153
|
function videoTrackEndedRecovery() {
|
|
@@ -11146,7 +11170,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11146
11170
|
break;
|
|
11147
11171
|
}
|
|
11148
11172
|
|
|
11149
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Detected video track \"".concat(event.type, "\" event, delay video stream access detection"));
|
|
11173
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Detected video track \"".concat(event.type, "\" event, delay camera video stream access detection"));
|
|
11150
11174
|
this.setCameraAccessTimeout();
|
|
11151
11175
|
return _context16.abrupt("return");
|
|
11152
11176
|
|
|
@@ -11747,7 +11771,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11747
11771
|
|
|
11748
11772
|
case 11:
|
|
11749
11773
|
stream = _context27.sent;
|
|
11750
|
-
exports.Logger.log(exports.Logger.Level.DEBUG, "Camera accessed, waiting for video stream start..."); // Detect weird browser behaviour that on unsupported resolution returns a 2x2 video instead
|
|
11774
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Camera accessed, waiting for camera video stream start..."); // Detect weird browser behaviour that on unsupported resolution returns a 2x2 video instead
|
|
11751
11775
|
|
|
11752
11776
|
if (!(typeof stream.getTracks()[0].getSettings === "function")) {
|
|
11753
11777
|
_context27.next = 22;
|
|
@@ -11843,13 +11867,24 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
11843
11867
|
while (1) {
|
|
11844
11868
|
switch (_context28.prev = _context28.next) {
|
|
11845
11869
|
case 0:
|
|
11846
|
-
|
|
11870
|
+
if (!(document.visibilityState !== "visible")) {
|
|
11871
|
+
_context28.next = 5;
|
|
11872
|
+
break;
|
|
11873
|
+
}
|
|
11874
|
+
|
|
11875
|
+
exports.Logger.log(exports.Logger.Level.DEBUG, "Page is currently not visible, delay camera video stream access detection");
|
|
11876
|
+
document.addEventListener("visibilitychange", _this9.checkCameraVideoStreamAccessIfVisibleListener);
|
|
11877
|
+
_context28.next = 8;
|
|
11878
|
+
break;
|
|
11879
|
+
|
|
11880
|
+
case 5:
|
|
11881
|
+
_context28.next = 7;
|
|
11847
11882
|
return _this9.stopStream(true);
|
|
11848
11883
|
|
|
11849
|
-
case
|
|
11884
|
+
case 7:
|
|
11850
11885
|
(_this9$cameraAccessRe = _this9.cameraAccessRejectCallback) === null || _this9$cameraAccessRe === void 0 ? void 0 : _this9$cameraAccessRe.call(_this9, new CustomError(CameraManager.notReadableErrorParameters));
|
|
11851
11886
|
|
|
11852
|
-
case
|
|
11887
|
+
case 8:
|
|
11853
11888
|
case "end":
|
|
11854
11889
|
return _context28.stop();
|
|
11855
11890
|
}
|
|
@@ -16434,7 +16469,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
16434
16469
|
return assertUnreachable(schema);
|
|
16435
16470
|
}
|
|
16436
16471
|
|
|
16437
|
-
|
|
16472
|
+
/******************************************************************************
|
|
16438
16473
|
Copyright (c) Microsoft Corporation.
|
|
16439
16474
|
|
|
16440
16475
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -17827,7 +17862,7 @@ var browser = createCommonjsModule(function (module, exports) {
|
|
|
17827
17862
|
while (1) {
|
|
17828
17863
|
switch (_context.prev = _context.next) {
|
|
17829
17864
|
case 0:
|
|
17830
|
-
exports.Logger.log(exports.Logger.Level.INFO, "Scandit Web SDK version: 5.11.
|
|
17865
|
+
exports.Logger.log(exports.Logger.Level.INFO, "Scandit Web SDK version: 5.11.1");
|
|
17831
17866
|
exports.configurePhase = "started";
|
|
17832
17867
|
browserCompatibility = exports.BrowserHelper.checkBrowserCompatibility();
|
|
17833
17868
|
|