idmission-web-sdk 1.0.326 → 1.0.328
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/sdk2.cjs.development.js +19 -3
- 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 +19 -3
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +19 -3
- 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
|
@@ -50,7 +50,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
50
50
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
51
51
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
52
52
|
|
|
53
|
-
var webSdkVersion = '1.0.
|
|
53
|
+
var webSdkVersion = '1.0.328';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -8872,6 +8872,7 @@ var HighPerformanceSelfieGuidanceModelsProvider = function HighPerformanceSelfie
|
|
|
8872
8872
|
var _h = React.useState(0),
|
|
8873
8873
|
modelDownloadProgress = _h[0],
|
|
8874
8874
|
setModelDownloadProgress = _h[1];
|
|
8875
|
+
console.log('button_fail', 'HighPerformanceSelfieGuidanceModelsProvider - modelError:', !!modelError, ' - ready:', ready);
|
|
8875
8876
|
React.useEffect(function () {
|
|
8876
8877
|
(function () {
|
|
8877
8878
|
return tslib.__awaiter(void 0, void 0, void 0, function () {
|
|
@@ -8885,6 +8886,7 @@ var HighPerformanceSelfieGuidanceModelsProvider = function HighPerformanceSelfie
|
|
|
8885
8886
|
setReady(false);
|
|
8886
8887
|
document.addEventListener('idmission.preloadProgress.faceDetection', handleDownloadProgress);
|
|
8887
8888
|
modelLoadTimeout = setTimeout(function () {
|
|
8889
|
+
console.log('button_fail', 'HighPerformanceSelfieGuidanceModelsProvider:modelLoadTimeout');
|
|
8888
8890
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
8889
8891
|
}, modelLoadTimeoutMs);
|
|
8890
8892
|
_b.label = 1;
|
|
@@ -9290,6 +9292,7 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
|
|
|
9290
9292
|
var _m = React.useState(0),
|
|
9291
9293
|
modelDownloadProgress = _m[0],
|
|
9292
9294
|
setModelDownloadProgress = _m[1];
|
|
9295
|
+
console.log('button_fail', 'IdCaptureModelsProvider:modelError - modelError:', !!modelError, ' - ready:', ready);
|
|
9293
9296
|
React.useEffect(function () {
|
|
9294
9297
|
var _a;
|
|
9295
9298
|
setReady(false);
|
|
@@ -9323,6 +9326,7 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
|
|
|
9323
9326
|
});
|
|
9324
9327
|
}
|
|
9325
9328
|
var modelLoadTimeout = setTimeout(function () {
|
|
9329
|
+
console.log('button_fail', 'IdCaptureModelsProvider:modelLoadTimeout');
|
|
9326
9330
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
9327
9331
|
}, modelLoadTimeoutMs);
|
|
9328
9332
|
loadModels().then(function () {
|
|
@@ -9340,6 +9344,7 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
|
|
|
9340
9344
|
if (webGLCanvas) {
|
|
9341
9345
|
webGLCanvas.addEventListener('webglcontextlost', handleWebglContextLoss);
|
|
9342
9346
|
} else {
|
|
9347
|
+
console.log('button_fail', 'IdCaptureModelsProvider:no webgl context');
|
|
9343
9348
|
handleWebglContextLoss();
|
|
9344
9349
|
}
|
|
9345
9350
|
return function () {
|
|
@@ -12782,7 +12787,16 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
|
|
|
12782
12787
|
});
|
|
12783
12788
|
}
|
|
12784
12789
|
if (typeof ImageCapture !== 'undefined') {
|
|
12785
|
-
|
|
12790
|
+
var tracks = cameraRef.current.stream.getTracks();
|
|
12791
|
+
var videoCameraTrack = tracks.find(function (track) {
|
|
12792
|
+
return track.kind === 'video';
|
|
12793
|
+
});
|
|
12794
|
+
if (videoCameraTrack) {
|
|
12795
|
+
var imageCapture = new ImageCapture(videoCameraTrack);
|
|
12796
|
+
imageCapture.takePhoto().then(onComplete)["catch"](function () {});
|
|
12797
|
+
} else {
|
|
12798
|
+
throw new Error('Failed to find a video feed for taking a photo');
|
|
12799
|
+
}
|
|
12786
12800
|
} else if (videoTag) {
|
|
12787
12801
|
var canvas = document.createElement('canvas');
|
|
12788
12802
|
drawToCanvas(canvas, videoTag);
|
|
@@ -15339,6 +15353,7 @@ var useVideoRecorder = function useVideoRecorder(camera) {
|
|
|
15339
15353
|
videoChunks.current.push(e.data);
|
|
15340
15354
|
};
|
|
15341
15355
|
mediaRecorder.current.onstop = function () {
|
|
15356
|
+
console.log('button_fail', 'useVideoRecorder:mediaRecorder.current.onstop');
|
|
15342
15357
|
var blobFile = new Blob(videoChunks.current, {
|
|
15343
15358
|
type: 'video/mp4'
|
|
15344
15359
|
});
|
|
@@ -15351,6 +15366,7 @@ var useVideoRecorder = function useVideoRecorder(camera) {
|
|
|
15351
15366
|
}, [camera, stream]);
|
|
15352
15367
|
var stopRecording = React.useCallback(function () {
|
|
15353
15368
|
var _a;
|
|
15369
|
+
console.log('button_fail', 'useVideoRecorder:stopRecording');
|
|
15354
15370
|
(_a = mediaRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
15355
15371
|
}, []);
|
|
15356
15372
|
return {
|
|
@@ -16588,7 +16604,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
16588
16604
|
setIdCaptureVideoUrl = _1.setIdCaptureVideoUrl,
|
|
16589
16605
|
setIdCaptureVideoIdFrontImage = _1.setIdCaptureVideoIdFrontImage,
|
|
16590
16606
|
setIdCaptureVideoIdBackImage = _1.setIdCaptureVideoIdBackImage;
|
|
16591
|
-
var _2 = React.useState('
|
|
16607
|
+
var _2 = React.useState('CAPTURING_VIDEO'),
|
|
16592
16608
|
captureState = _2[0],
|
|
16593
16609
|
setCaptureState = _2[1];
|
|
16594
16610
|
React.useEffect(function () {
|