idmission-web-sdk 1.0.36 → 1.0.38
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.
- package/dist/components/id_capture/IdCapture.d.ts +0 -1
- package/dist/lib/camera/hooks.d.ts +0 -1
- package/dist/sdk2.cjs.development.js +7 -20
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +7 -20
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +7 -20
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/lib/utils/OffscreenCanvasPolyfill.d.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import '../../lib/utils/OffscreenCanvasPolyfill';
|
|
3
2
|
import { DocumentType } from '../../lib/models/DocumentDetection';
|
|
4
3
|
import { PDF417DetectionResult } from '../../lib/barcode/Native';
|
|
5
4
|
import { CaptureAttemptMetadata } from '../../contexts/SubmissionContext';
|
|
@@ -50,7 +50,7 @@ var tf__namespace = /*#__PURE__*/_interopNamespace(tf);
|
|
|
50
50
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
51
51
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
52
52
|
|
|
53
|
-
var webSdkVersion = '1.0.
|
|
53
|
+
var webSdkVersion = '1.0.38';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
return window.platform;
|
|
@@ -966,24 +966,6 @@ function bboxToDetectedObjectUnscaled(box, score, label) {
|
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
|
|
969
|
-
if (!window.OffscreenCanvas) {
|
|
970
|
-
window.OffscreenCanvas = function () {
|
|
971
|
-
function OffscreenCanvas(width, height) {
|
|
972
|
-
var _this = this;
|
|
973
|
-
this.canvas = document.createElement('canvas');
|
|
974
|
-
this.canvas.width = width;
|
|
975
|
-
this.canvas.height = height;
|
|
976
|
-
this.canvas.convertToBlob = function () {
|
|
977
|
-
return new Promise(function (resolve) {
|
|
978
|
-
_this.canvas.toBlob(resolve);
|
|
979
|
-
});
|
|
980
|
-
};
|
|
981
|
-
return this.canvas;
|
|
982
|
-
}
|
|
983
|
-
return OffscreenCanvas;
|
|
984
|
-
}();
|
|
985
|
-
}
|
|
986
|
-
|
|
987
969
|
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
988
970
|
orientation: 'landscape',
|
|
989
971
|
wrapperWidth: 1,
|
|
@@ -1607,7 +1589,6 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
1607
1589
|
track.onended = handleStreamEnded;
|
|
1608
1590
|
});
|
|
1609
1591
|
cameraRef.current = obtainCameraAccess(stream, videoDevice.label, videoRef.current);
|
|
1610
|
-
setCameraReady(true);
|
|
1611
1592
|
return [2];
|
|
1612
1593
|
}
|
|
1613
1594
|
});
|
|
@@ -1615,6 +1596,12 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
1615
1596
|
})();
|
|
1616
1597
|
return cleanup;
|
|
1617
1598
|
}, [iphoneContinuityCameraAllowed, iphoneContinuityCameraAvailable, requestMicrophoneAccess, videoDevice]);
|
|
1599
|
+
React.useEffect(function () {
|
|
1600
|
+
setCameraReady(false);
|
|
1601
|
+
if (videoDevice && videoLoaded) {
|
|
1602
|
+
setCameraReady(true);
|
|
1603
|
+
}
|
|
1604
|
+
}, [videoLoaded, videoDevice]);
|
|
1618
1605
|
var takePhoto = React.useCallback(function () {
|
|
1619
1606
|
return tslib.__awaiter(void 0, void 0, void 0, function () {
|
|
1620
1607
|
var canvas, ctx, photoURL, data;
|