idmission-web-sdk 2.0.0 → 2.0.2
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/README.md +1 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/video_id/IdVideoCapture.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +1 -1
- package/dist/lib/camera/useVideoRecorder.d.ts +1 -1
- package/dist/sdk2.cjs.development.js +278 -203
- 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 +278 -203
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +278 -203
- 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/stories/CustomerFlows/VideoIdValidation.stories.d.ts +8 -10
- package/dist/version.d.ts +1 -1
- package/package.json +9 -9
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
return cooked;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
var webSdkVersion = '2.0.
|
|
143
|
+
var webSdkVersion = '2.0.2';
|
|
144
144
|
|
|
145
145
|
function getPlatform() {
|
|
146
146
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -3049,7 +3049,7 @@
|
|
|
3049
3049
|
var models = {};
|
|
3050
3050
|
function loadFocusModel(modelAssetPath) {
|
|
3051
3051
|
return __awaiter(this, void 0, void 0, function () {
|
|
3052
|
-
var id, _a, _b, _c, _d
|
|
3052
|
+
var id, _a, _b, _c, _d;
|
|
3053
3053
|
return __generator(this, function (_e) {
|
|
3054
3054
|
switch (_e.label) {
|
|
3055
3055
|
case 0:
|
|
@@ -3072,12 +3072,16 @@
|
|
|
3072
3072
|
delegate: modelCapabilities.delegate
|
|
3073
3073
|
},
|
|
3074
3074
|
runningMode: 'VIDEO'
|
|
3075
|
-
}])
|
|
3075
|
+
}])
|
|
3076
|
+
// const emptyFrame = document.createElement('canvas')
|
|
3077
|
+
// models[id].classifyForVideo(emptyFrame, performance.now())
|
|
3078
|
+
// emptyFrame.remove()
|
|
3079
|
+
];
|
|
3076
3080
|
case 3:
|
|
3077
3081
|
_a[_b] = _e.sent();
|
|
3078
|
-
emptyFrame = document.createElement('canvas')
|
|
3079
|
-
models[id].classifyForVideo(emptyFrame, performance.now())
|
|
3080
|
-
emptyFrame.remove()
|
|
3082
|
+
// const emptyFrame = document.createElement('canvas')
|
|
3083
|
+
// models[id].classifyForVideo(emptyFrame, performance.now())
|
|
3084
|
+
// emptyFrame.remove()
|
|
3081
3085
|
return [2 /*return*/, models[id]];
|
|
3082
3086
|
}
|
|
3083
3087
|
});
|
|
@@ -3316,7 +3320,7 @@
|
|
|
3316
3320
|
var detector;
|
|
3317
3321
|
function loadFaceDetector() {
|
|
3318
3322
|
return __awaiter(this, void 0, void 0, function () {
|
|
3319
|
-
var _a, _b
|
|
3323
|
+
var _a, _b;
|
|
3320
3324
|
return __generator(this, function (_c) {
|
|
3321
3325
|
switch (_c.label) {
|
|
3322
3326
|
case 0:
|
|
@@ -3336,12 +3340,16 @@
|
|
|
3336
3340
|
delegate: modelCapabilities.delegate
|
|
3337
3341
|
},
|
|
3338
3342
|
runningMode: 'VIDEO'
|
|
3339
|
-
}])
|
|
3343
|
+
}])
|
|
3344
|
+
// const emptyFrame = document.createElement('canvas')
|
|
3345
|
+
// detector.detectForVideo(emptyFrame, performance.now())
|
|
3346
|
+
// emptyFrame.remove()
|
|
3347
|
+
];
|
|
3340
3348
|
case 3:
|
|
3341
3349
|
detector = _c.sent();
|
|
3342
|
-
emptyFrame = document.createElement('canvas')
|
|
3343
|
-
detector.detectForVideo(emptyFrame, performance.now())
|
|
3344
|
-
emptyFrame.remove()
|
|
3350
|
+
// const emptyFrame = document.createElement('canvas')
|
|
3351
|
+
// detector.detectForVideo(emptyFrame, performance.now())
|
|
3352
|
+
// emptyFrame.remove()
|
|
3345
3353
|
return [2 /*return*/, detector];
|
|
3346
3354
|
}
|
|
3347
3355
|
});
|
|
@@ -3664,7 +3672,7 @@
|
|
|
3664
3672
|
scoreThreshold = defaultDocumentDetectionScoreThreshold;
|
|
3665
3673
|
}
|
|
3666
3674
|
return __awaiter(this, void 0, void 0, function () {
|
|
3667
|
-
var id, _a, _b, _c, _d
|
|
3675
|
+
var id, _a, _b, _c, _d;
|
|
3668
3676
|
return __generator(this, function (_e) {
|
|
3669
3677
|
switch (_e.label) {
|
|
3670
3678
|
case 0:
|
|
@@ -3688,12 +3696,16 @@
|
|
|
3688
3696
|
},
|
|
3689
3697
|
scoreThreshold: scoreThreshold,
|
|
3690
3698
|
runningMode: 'VIDEO'
|
|
3691
|
-
}])
|
|
3699
|
+
}])
|
|
3700
|
+
// const emptyFrame = document.createElement('canvas')
|
|
3701
|
+
// detectors[id].detectForVideo(emptyFrame, performance.now())
|
|
3702
|
+
// emptyFrame.remove()
|
|
3703
|
+
];
|
|
3692
3704
|
case 3:
|
|
3693
3705
|
_a[_b] = _e.sent();
|
|
3694
|
-
emptyFrame = document.createElement('canvas')
|
|
3695
|
-
detectors[id].detectForVideo(emptyFrame, performance.now())
|
|
3696
|
-
emptyFrame.remove()
|
|
3706
|
+
// const emptyFrame = document.createElement('canvas')
|
|
3707
|
+
// detectors[id].detectForVideo(emptyFrame, performance.now())
|
|
3708
|
+
// emptyFrame.remove()
|
|
3697
3709
|
return [2 /*return*/, detectors[id]];
|
|
3698
3710
|
}
|
|
3699
3711
|
});
|
|
@@ -12425,14 +12437,20 @@
|
|
|
12425
12437
|
var captureStartedAt = React.useRef();
|
|
12426
12438
|
var captureEndedAt = React.useRef();
|
|
12427
12439
|
var operationStartedAt = React.useRef();
|
|
12440
|
+
var _x = React.useContext(SelfieGuidanceModelsContext),
|
|
12441
|
+
start = _x.start,
|
|
12442
|
+
stop = _x.stop;
|
|
12428
12443
|
React.useEffect(function () {
|
|
12429
12444
|
operationStartedAt.current = new Date();
|
|
12430
12445
|
}, []);
|
|
12431
12446
|
React.useEffect(function () {
|
|
12432
|
-
if (captureState
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12447
|
+
if (captureState !== 'CAPTURING') return;
|
|
12448
|
+
captureStartedAt.current = new Date();
|
|
12449
|
+
start();
|
|
12450
|
+
return function () {
|
|
12451
|
+
stop();
|
|
12452
|
+
};
|
|
12453
|
+
}, [captureState, start, stop]);
|
|
12436
12454
|
var onCapture = React.useCallback(function () {
|
|
12437
12455
|
captureEndedAt.current = new Date();
|
|
12438
12456
|
}, []);
|
|
@@ -12469,9 +12487,9 @@
|
|
|
12469
12487
|
setCaptureState('FAILED');
|
|
12470
12488
|
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout(submissionResponse, livenessCheckRequest);
|
|
12471
12489
|
}, [onTimeout, livenessCheckRequest, submissionResponse]);
|
|
12472
|
-
var
|
|
12473
|
-
attempt =
|
|
12474
|
-
setAttempt =
|
|
12490
|
+
var _y = React.useState(0),
|
|
12491
|
+
attempt = _y[0],
|
|
12492
|
+
setAttempt = _y[1];
|
|
12475
12493
|
var onExitCallback = React.useCallback(function () {
|
|
12476
12494
|
setAttempt(function (n) {
|
|
12477
12495
|
return n + 1;
|
|
@@ -13507,7 +13525,10 @@
|
|
|
13507
13525
|
var AcceptBtn$1 = styled__default['default'](LoaderButton)(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
|
|
13508
13526
|
var templateObject_1$b;
|
|
13509
13527
|
|
|
13510
|
-
var useVideoRecorder = function useVideoRecorder(camera, audioStream) {
|
|
13528
|
+
var useVideoRecorder = function useVideoRecorder(camera, audioStream, mergeAVStreams) {
|
|
13529
|
+
if (mergeAVStreams === void 0) {
|
|
13530
|
+
mergeAVStreams = false;
|
|
13531
|
+
}
|
|
13511
13532
|
var videoRecorder = React.useRef(null);
|
|
13512
13533
|
var audioRecorder = React.useRef(null);
|
|
13513
13534
|
var videoChunks = React.useRef([]);
|
|
@@ -13536,7 +13557,13 @@
|
|
|
13536
13557
|
var _h = React.useState(false),
|
|
13537
13558
|
audioRecordingIntentionallyStopped = _h[0],
|
|
13538
13559
|
setAudioRecordingIntentionallyStopped = _h[1];
|
|
13539
|
-
var
|
|
13560
|
+
var getVideoStream = React.useCallback(function () {
|
|
13561
|
+
var _a, _b, _c;
|
|
13562
|
+
if (!mergeAVStreams) return camera === null || camera === void 0 ? void 0 : camera.stream;
|
|
13563
|
+
var videoTracks = (_b = (_a = camera === null || camera === void 0 ? void 0 : camera.stream) === null || _a === void 0 ? void 0 : _a.getTracks()) !== null && _b !== void 0 ? _b : [];
|
|
13564
|
+
var audioTracks = (_c = audioStream === null || audioStream === void 0 ? void 0 : audioStream.getTracks()) !== null && _c !== void 0 ? _c : [];
|
|
13565
|
+
return new MediaStream(__spreadArray(__spreadArray([], videoTracks, true), audioTracks, true));
|
|
13566
|
+
}, [audioStream, camera === null || camera === void 0 ? void 0 : camera.stream, mergeAVStreams]);
|
|
13540
13567
|
var processVideo = React.useCallback(function () {
|
|
13541
13568
|
var videoBlob = new Blob(videoChunks.current, {
|
|
13542
13569
|
type: 'video/mp4'
|
|
@@ -13557,13 +13584,15 @@
|
|
|
13557
13584
|
(_a = audioStream === null || audioStream === void 0 ? void 0 : audioStream.stop) === null || _a === void 0 ? void 0 : _a.call(audioStream);
|
|
13558
13585
|
}, [audioStream]);
|
|
13559
13586
|
var startRecordingVideo = React.useCallback(function () {
|
|
13587
|
+
var videoStream = getVideoStream();
|
|
13560
13588
|
if (!videoStream) return;
|
|
13561
13589
|
videoChunks.current = [];
|
|
13562
13590
|
setIsRecordingVideo(true);
|
|
13563
13591
|
setVideoRecordingStopped(false);
|
|
13564
13592
|
setVideoRecordingIntentionallyStopped(false);
|
|
13565
13593
|
videoRecorder.current = new MediaRecorder(videoStream, {
|
|
13566
|
-
videoBitsPerSecond: 270000
|
|
13594
|
+
videoBitsPerSecond: 270000,
|
|
13595
|
+
audioBitsPerSecond: 32000
|
|
13567
13596
|
});
|
|
13568
13597
|
videoRecorder.current.ondataavailable = function (e) {
|
|
13569
13598
|
videoChunks.current.push(e.data);
|
|
@@ -13579,8 +13608,9 @@
|
|
|
13579
13608
|
// TODO: figure out what to do here
|
|
13580
13609
|
}
|
|
13581
13610
|
}, 100);
|
|
13582
|
-
}, [
|
|
13611
|
+
}, [getVideoStream]);
|
|
13583
13612
|
var startRecordingAudio = React.useCallback(function () {
|
|
13613
|
+
if (mergeAVStreams) return;
|
|
13584
13614
|
if (!audioStream) return;
|
|
13585
13615
|
audioChunks.current = [];
|
|
13586
13616
|
setIsRecordingAudio(true);
|
|
@@ -13596,7 +13626,7 @@
|
|
|
13596
13626
|
setAudioRecordingStopped(true);
|
|
13597
13627
|
};
|
|
13598
13628
|
audioRecorder.current.start(1000);
|
|
13599
|
-
}, [audioStream]);
|
|
13629
|
+
}, [audioStream, mergeAVStreams]);
|
|
13600
13630
|
var stopRecordingVideo = React.useCallback(function () {
|
|
13601
13631
|
var _a, _b;
|
|
13602
13632
|
setVideoRecordingIntentionallyStopped(true);
|
|
@@ -13898,45 +13928,52 @@
|
|
|
13898
13928
|
onRetryClicked = _a.onRetryClicked,
|
|
13899
13929
|
onExitCapture = _a.onExitCapture,
|
|
13900
13930
|
onUserCancel = _a.onUserCancel,
|
|
13901
|
-
onModelError = _a.onModelError,
|
|
13902
13931
|
_c = _a.loadingOverlayMode,
|
|
13903
13932
|
loadingOverlayMode = _c === void 0 ? 'default' : _c,
|
|
13904
|
-
_d = _a.
|
|
13905
|
-
|
|
13906
|
-
_e = _a.
|
|
13907
|
-
|
|
13908
|
-
_f = _a.
|
|
13909
|
-
|
|
13910
|
-
_g = _a.
|
|
13911
|
-
|
|
13912
|
-
_h = _a.
|
|
13913
|
-
|
|
13914
|
-
_j = _a.
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13919
|
-
|
|
13920
|
-
|
|
13921
|
-
|
|
13922
|
-
|
|
13923
|
-
setSignatureVideoUrl = _l.setSignatureVideoUrl,
|
|
13924
|
-
logSelfieCaptureAttempt = _l.logSelfieCaptureAttempt;
|
|
13933
|
+
_d = _a.skipSuccessScreen,
|
|
13934
|
+
skipSuccessScreen = _d === void 0 ? false : _d,
|
|
13935
|
+
_e = _a.assets,
|
|
13936
|
+
assets = _e === void 0 ? {} : _e,
|
|
13937
|
+
_f = _a.classNames,
|
|
13938
|
+
classNames = _f === void 0 ? {} : _f,
|
|
13939
|
+
_g = _a.colors,
|
|
13940
|
+
colors = _g === void 0 ? {} : _g,
|
|
13941
|
+
_h = _a.verbiage,
|
|
13942
|
+
verbiage = _h === void 0 ? {} : _h,
|
|
13943
|
+
_j = _a.debugMode,
|
|
13944
|
+
debugMode = _j === void 0 ? false : _j;
|
|
13945
|
+
var _k = React.useContext(SubmissionContext),
|
|
13946
|
+
selfieImage = _k.selfieImage,
|
|
13947
|
+
signatureVideoUrl = _k.signatureVideoUrl,
|
|
13948
|
+
setSelfieImage = _k.setSelfieImage,
|
|
13949
|
+
setSignatureData = _k.setSignatureData,
|
|
13950
|
+
setSignatureVideoUrl = _k.setSignatureVideoUrl,
|
|
13951
|
+
logSelfieCaptureAttempt = _k.logSelfieCaptureAttempt;
|
|
13925
13952
|
var cameraAccessDenied = React.useContext(CameraStateContext).cameraAccessDenied;
|
|
13926
|
-
var
|
|
13927
|
-
captureState =
|
|
13928
|
-
setCaptureState =
|
|
13953
|
+
var _l = React.useState('LOADING'),
|
|
13954
|
+
captureState = _l[0],
|
|
13955
|
+
setCaptureState = _l[1];
|
|
13929
13956
|
var operationStartedAt = React.useRef();
|
|
13930
13957
|
var captureStartedAt = React.useRef();
|
|
13931
13958
|
var captureEndedAt = React.useRef();
|
|
13959
|
+
var _m = React.useContext(SelfieGuidanceModelsContext),
|
|
13960
|
+
start = _m.start,
|
|
13961
|
+
stop = _m.stop;
|
|
13932
13962
|
React.useEffect(function () {
|
|
13933
13963
|
operationStartedAt.current = new Date();
|
|
13934
13964
|
}, []);
|
|
13935
13965
|
React.useEffect(function () {
|
|
13936
|
-
if (captureState
|
|
13937
|
-
|
|
13938
|
-
}
|
|
13966
|
+
if (captureState !== 'CHECKING_LIVENESS') return;
|
|
13967
|
+
captureStartedAt.current = new Date();
|
|
13939
13968
|
}, [captureState]);
|
|
13969
|
+
var shouldRun = ['CHECKING_LIVENESS', 'CAPTURING_SIGNATURE'].includes(captureState);
|
|
13970
|
+
React.useEffect(function () {
|
|
13971
|
+
if (!shouldRun) return;
|
|
13972
|
+
start();
|
|
13973
|
+
return function () {
|
|
13974
|
+
stop();
|
|
13975
|
+
};
|
|
13976
|
+
}, [shouldRun, start, stop]);
|
|
13940
13977
|
var logCaptureMetadata = React.useCallback(function () {
|
|
13941
13978
|
var _a, _b, _c;
|
|
13942
13979
|
logSelfieCaptureAttempt({
|
|
@@ -14001,11 +14038,7 @@
|
|
|
14001
14038
|
setCaptureState('LOADING');
|
|
14002
14039
|
}
|
|
14003
14040
|
}, [cameraAccessDenied]);
|
|
14004
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
14005
|
-
throttleMs: captureState === 'CAPTURING_SIGNATURE' ? 250 : 0,
|
|
14006
|
-
onModelError: onModelError,
|
|
14007
|
-
modelLoadTimeoutMs: modelLoadTimeoutMs
|
|
14008
|
-
}, /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
14041
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
14009
14042
|
className: "flex ".concat((_b = classNames === null || classNames === void 0 ? void 0 : classNames.container) !== null && _b !== void 0 ? _b : '')
|
|
14010
14043
|
}, /*#__PURE__*/React__default['default'].createElement(CameraVideoTag, {
|
|
14011
14044
|
className: classNames.cameraFeed
|
|
@@ -14370,79 +14403,85 @@
|
|
|
14370
14403
|
disableFaceDetectionWhileAudioCapture = _8 === void 0 ? false : _8,
|
|
14371
14404
|
_9 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
14372
14405
|
disableFaceDetectionWhileAudioCaptureMsDelay = _9 === void 0 ? 2000 : _9,
|
|
14373
|
-
_10 = _a.
|
|
14374
|
-
|
|
14375
|
-
_11 = _a.
|
|
14376
|
-
|
|
14377
|
-
_12 = _a.
|
|
14378
|
-
|
|
14379
|
-
_13 = _a.
|
|
14380
|
-
|
|
14381
|
-
_14 = _a.
|
|
14382
|
-
|
|
14383
|
-
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
_17 =
|
|
14388
|
-
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
|
|
14393
|
-
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
setDetectedObjects = _19[1];
|
|
14406
|
+
_10 = _a.mergeAVStreams,
|
|
14407
|
+
mergeAVStreams = _10 === void 0 ? false : _10,
|
|
14408
|
+
_11 = _a.assets,
|
|
14409
|
+
assets = _11 === void 0 ? {} : _11,
|
|
14410
|
+
_12 = _a.classNames,
|
|
14411
|
+
classNames = _12 === void 0 ? {} : _12,
|
|
14412
|
+
_13 = _a.colors,
|
|
14413
|
+
colors = _13 === void 0 ? {} : _13,
|
|
14414
|
+
_14 = _a.verbiage,
|
|
14415
|
+
rawVerbiage = _14 === void 0 ? {} : _14,
|
|
14416
|
+
_15 = _a.debugMode,
|
|
14417
|
+
debugMode = _15 === void 0 ? false : _15;
|
|
14418
|
+
var _16 = useResizeObserver(),
|
|
14419
|
+
ref = _16.ref,
|
|
14420
|
+
_17 = _16.width,
|
|
14421
|
+
width = _17 === void 0 ? 1 : _17,
|
|
14422
|
+
_18 = _16.height,
|
|
14423
|
+
height = _18 === void 0 ? 1 : _18;
|
|
14424
|
+
var _19 = React.useContext(CameraStateContext),
|
|
14425
|
+
cameraRef = _19.cameraRef,
|
|
14426
|
+
videoRef = _19.videoRef,
|
|
14427
|
+
videoLoaded = _19.videoLoaded,
|
|
14428
|
+
cameraReady = _19.cameraReady,
|
|
14429
|
+
microphoneReady = _19.microphoneReady,
|
|
14430
|
+
audioStream = _19.audioStream,
|
|
14431
|
+
setVideoLoaded = _19.setVideoLoaded,
|
|
14432
|
+
takePhoto = _19.takePhoto;
|
|
14401
14433
|
var _20 = React.useState([]),
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
var _21 = React.
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
var _23 = React.
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
var _24 = React.useContext(
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
var _25 =
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14434
|
+
detectedObjects = _20[0],
|
|
14435
|
+
setDetectedObjects = _20[1];
|
|
14436
|
+
var _21 = React.useState([]),
|
|
14437
|
+
faces = _21[0],
|
|
14438
|
+
setFaces = _21[1];
|
|
14439
|
+
var _22 = React.useContext(IdCaptureModelsContext),
|
|
14440
|
+
idModelsReady = _22.ready,
|
|
14441
|
+
startIdModels = _22.start,
|
|
14442
|
+
stopIdModels = _22.stop,
|
|
14443
|
+
onIdPredictionMade = _22.onPredictionMade,
|
|
14444
|
+
setThresholds = _22.setThresholds,
|
|
14445
|
+
bestFrameDetails = _22.bestFrameDetails,
|
|
14446
|
+
resetBestFrame = _22.resetBestFrame,
|
|
14447
|
+
idModelError = _22.modelError;
|
|
14448
|
+
var _23 = React.useState(null),
|
|
14449
|
+
videoStartsAt = _23[0],
|
|
14450
|
+
setVideoStartsAt = _23[1];
|
|
14451
|
+
var _24 = React.useContext(SubmissionContext),
|
|
14452
|
+
setIdCaptureVideoAudioStartsAt = _24.setIdCaptureVideoAudioStartsAt,
|
|
14453
|
+
setExpectedAudioText = _24.setExpectedAudioText;
|
|
14454
|
+
var _25 = React.useContext(SelfieGuidanceModelsContext),
|
|
14455
|
+
onSelfiePredictionMade = _25.onPredictionMade,
|
|
14456
|
+
selfieModelError = _25.error;
|
|
14457
|
+
var _26 = useVideoRecorder(cameraRef.current, audioStream, mergeAVStreams),
|
|
14458
|
+
isRecordingVideo = _26.isRecordingVideo,
|
|
14459
|
+
startRecordingVideo = _26.startRecordingVideo,
|
|
14460
|
+
startRecordingAudio = _26.startRecordingAudio,
|
|
14461
|
+
stopRecordingVideo = _26.stopRecordingVideo,
|
|
14462
|
+
stopRecordingAudio = _26.stopRecordingAudio,
|
|
14463
|
+
videoRecordingUnintentionallyStopped = _26.videoRecordingUnintentionallyStopped,
|
|
14464
|
+
audioRecordingUnintentionallyStopped = _26.audioRecordingUnintentionallyStopped,
|
|
14465
|
+
videoUrl = _26.videoUrl,
|
|
14466
|
+
audioUrl = _26.audioUrl;
|
|
14432
14467
|
var countdownTimeoutRef = React.useRef(undefined);
|
|
14433
|
-
var
|
|
14434
|
-
countdownRemaining =
|
|
14435
|
-
setCountdownRemaining =
|
|
14468
|
+
var _27 = React.useState(0),
|
|
14469
|
+
countdownRemaining = _27[0],
|
|
14470
|
+
setCountdownRemaining = _27[1];
|
|
14436
14471
|
React.useEffect(function () {
|
|
14437
14472
|
if (!isRecordingVideo && !videoUrl) {
|
|
14438
14473
|
startRecordingVideo();
|
|
14439
14474
|
setVideoStartsAt(new Date());
|
|
14440
14475
|
}
|
|
14441
|
-
if
|
|
14476
|
+
// if the mergeAVStreams flag is present, the audio stream is on the video
|
|
14477
|
+
// stream, so we won't wait for a separate data url containing audio only.
|
|
14478
|
+
var needsAudio = !!readTextPrompt && !mergeAVStreams;
|
|
14479
|
+
var audioReady = !needsAudio || audioUrl;
|
|
14480
|
+
if (videoUrl && audioReady) {
|
|
14442
14481
|
setVideoLoaded(false);
|
|
14443
14482
|
onComplete === null || onComplete === void 0 ? void 0 : onComplete(videoUrl, audioUrl);
|
|
14444
14483
|
}
|
|
14445
|
-
}, [audioUrl, isRecordingVideo, onComplete, readTextPrompt, setVideoLoaded, startRecordingVideo, videoUrl]);
|
|
14484
|
+
}, [audioUrl, isRecordingVideo, mergeAVStreams, onComplete, readTextPrompt, setVideoLoaded, startRecordingVideo, videoUrl]);
|
|
14446
14485
|
React.useEffect(function () {
|
|
14447
14486
|
if (videoRecordingUnintentionallyStopped || audioRecordingUnintentionallyStopped) {
|
|
14448
14487
|
onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
|
|
@@ -14452,9 +14491,9 @@
|
|
|
14452
14491
|
React.useEffect(function () {
|
|
14453
14492
|
shouldCaptureFrames.current = videoLoaded && cameraReady && idModelsReady && !idModelError && (!readTextPrompt || microphoneReady);
|
|
14454
14493
|
}, [cameraReady, idModelError, idModelsReady, microphoneReady, readTextPrompt, videoLoaded]);
|
|
14455
|
-
var
|
|
14456
|
-
requestedAction =
|
|
14457
|
-
setRequestedAction =
|
|
14494
|
+
var _28 = React.useState('SHOW_ID_FRONT'),
|
|
14495
|
+
requestedAction = _28[0],
|
|
14496
|
+
setRequestedAction = _28[1];
|
|
14458
14497
|
React.useEffect(function startModelsWhenCapturing() {
|
|
14459
14498
|
if (!shouldCaptureFrames.current && requestedAction !== 'SHOW_ID_FRONT' && requestedAction !== 'SHOW_ID_BACK') return;
|
|
14460
14499
|
startIdModels();
|
|
@@ -14473,15 +14512,15 @@
|
|
|
14473
14512
|
}
|
|
14474
14513
|
});
|
|
14475
14514
|
}, [idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, requestedAction, setThresholds]);
|
|
14476
|
-
var _28 = React.useState(0),
|
|
14477
|
-
currentDetectionScore = _28[0],
|
|
14478
|
-
setCurrentDetectionScore = _28[1];
|
|
14479
14515
|
var _29 = React.useState(0),
|
|
14480
|
-
|
|
14481
|
-
|
|
14516
|
+
currentDetectionScore = _29[0],
|
|
14517
|
+
setCurrentDetectionScore = _29[1];
|
|
14482
14518
|
var _30 = React.useState(0),
|
|
14483
|
-
|
|
14484
|
-
|
|
14519
|
+
currentFocusScore = _30[0],
|
|
14520
|
+
setCurrentFocusScore = _30[1];
|
|
14521
|
+
var _31 = React.useState(0),
|
|
14522
|
+
goodFramesCount = _31[0],
|
|
14523
|
+
setGoodFramesCount = _31[1];
|
|
14485
14524
|
var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? goodIdCardFrontFramesThreshold : goodIdCardBackFramesThreshold;
|
|
14486
14525
|
var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
|
|
14487
14526
|
React.useEffect(function () {
|
|
@@ -14499,9 +14538,9 @@
|
|
|
14499
14538
|
}
|
|
14500
14539
|
});
|
|
14501
14540
|
}, [idCaptureModelsEnabled, idCardFrontDetectionThreshold, onIdPredictionMade, idModelError]);
|
|
14502
|
-
var
|
|
14503
|
-
idFrontCaptureStartedAt =
|
|
14504
|
-
setFirstGoodFrameTime =
|
|
14541
|
+
var _32 = React.useState(null),
|
|
14542
|
+
idFrontCaptureStartedAt = _32[0],
|
|
14543
|
+
setFirstGoodFrameTime = _32[1];
|
|
14505
14544
|
React.useEffect(function () {
|
|
14506
14545
|
if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
|
|
14507
14546
|
}, [goodFramesCount]);
|
|
@@ -14522,9 +14561,9 @@
|
|
|
14522
14561
|
var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
|
|
14523
14562
|
var faceBox = (_f = faces === null || faces === void 0 ? void 0 : faces[0]) === null || _f === void 0 ? void 0 : _f.box;
|
|
14524
14563
|
var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
|
|
14525
|
-
var
|
|
14526
|
-
countdownStartedAt =
|
|
14527
|
-
setCountdownStartedAt =
|
|
14564
|
+
var _33 = React.useState(),
|
|
14565
|
+
countdownStartedAt = _33[0],
|
|
14566
|
+
setCountdownStartedAt = _33[1];
|
|
14528
14567
|
var frameLock = React.useRef(false);
|
|
14529
14568
|
var captureFrame = React.useCallback(function () {
|
|
14530
14569
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -14645,9 +14684,9 @@
|
|
|
14645
14684
|
};
|
|
14646
14685
|
}, [captureCountdownSeconds, captureFrame, countdownStartedAt, manualCountdown]);
|
|
14647
14686
|
var timeoutStartedAt = useTimeout(readTextTimeoutDurationMs, stopRecording, requestedAction !== 'READ_TEXT', false, requestedAction === 'READ_TEXT').timeoutStartedAt;
|
|
14648
|
-
var
|
|
14649
|
-
numFramesWithoutFaces =
|
|
14650
|
-
setNumFramesWithoutFaces =
|
|
14687
|
+
var _34 = React.useState(0),
|
|
14688
|
+
numFramesWithoutFaces = _34[0],
|
|
14689
|
+
setNumFramesWithoutFaces = _34[1];
|
|
14651
14690
|
React.useEffect(function () {
|
|
14652
14691
|
if (!selfieModelError) {
|
|
14653
14692
|
onSelfiePredictionMade(function (faces) {
|
|
@@ -14665,14 +14704,14 @@
|
|
|
14665
14704
|
}
|
|
14666
14705
|
}, [disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, numFramesWithoutFaces, onFaceNotDetected, timeoutStartedAt]);
|
|
14667
14706
|
var theme = styled.useTheme();
|
|
14668
|
-
var
|
|
14707
|
+
var _35 = useTranslations(rawVerbiage, {
|
|
14669
14708
|
faceNotCenteredText: 'Please move your face to the center...',
|
|
14670
14709
|
searchingForIdCardText: 'Searching for ID card...',
|
|
14671
14710
|
captureBtnText: 'Capture'
|
|
14672
14711
|
}),
|
|
14673
|
-
captureBtnText =
|
|
14674
|
-
faceNotCenteredText =
|
|
14675
|
-
searchingForIdCardText =
|
|
14712
|
+
captureBtnText = _35.captureBtnText,
|
|
14713
|
+
faceNotCenteredText = _35.faceNotCenteredText,
|
|
14714
|
+
searchingForIdCardText = _35.searchingForIdCardText;
|
|
14676
14715
|
var debugScalingDetails = useDebugScalingDetails({
|
|
14677
14716
|
enabled: debugMode,
|
|
14678
14717
|
pageWidth: width,
|
|
@@ -14913,29 +14952,31 @@
|
|
|
14913
14952
|
disableFaceDetectionWhileAudioCaptureMsDelay = _v === void 0 ? 2000 : _v,
|
|
14914
14953
|
_w = _a.silentFallback,
|
|
14915
14954
|
silentFallback = _w === void 0 ? false : _w,
|
|
14916
|
-
_x = _a.
|
|
14917
|
-
|
|
14918
|
-
_y = _a.
|
|
14919
|
-
|
|
14920
|
-
_z = _a.
|
|
14921
|
-
|
|
14922
|
-
_0 = _a.
|
|
14923
|
-
|
|
14924
|
-
_1 = _a.
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14955
|
+
_x = _a.mergeAVStreams,
|
|
14956
|
+
mergeAVStreams = _x === void 0 ? false : _x,
|
|
14957
|
+
_y = _a.assets,
|
|
14958
|
+
assets = _y === void 0 ? {} : _y,
|
|
14959
|
+
_z = _a.classNames,
|
|
14960
|
+
classNames = _z === void 0 ? {} : _z,
|
|
14961
|
+
_0 = _a.colors,
|
|
14962
|
+
colors = _0 === void 0 ? {} : _0,
|
|
14963
|
+
_1 = _a.verbiage,
|
|
14964
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
14965
|
+
_2 = _a.debugMode,
|
|
14966
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
14967
|
+
var _3 = React.useContext(SubmissionContext),
|
|
14968
|
+
submissionStatus = _3.submissionStatus,
|
|
14969
|
+
idCaptureVideoUrl = _3.idCaptureVideoUrl,
|
|
14970
|
+
idCaptureVideoAudioUrl = _3.idCaptureVideoAudioUrl,
|
|
14971
|
+
idCaptureVideoIdFrontImage = _3.idCaptureVideoIdFrontImage,
|
|
14972
|
+
idCaptureVideoIdBackImage = _3.idCaptureVideoIdBackImage,
|
|
14973
|
+
setIdCaptureVideoUrl = _3.setIdCaptureVideoUrl,
|
|
14974
|
+
setIdCaptureVideoIdFrontImage = _3.setIdCaptureVideoIdFrontImage,
|
|
14975
|
+
setIdCaptureVideoIdBackImage = _3.setIdCaptureVideoIdBackImage,
|
|
14976
|
+
setIdCaptureVideoAudioUrl = _3.setIdCaptureVideoAudioUrl;
|
|
14977
|
+
var _4 = React.useState('CAPTURING_ID'),
|
|
14978
|
+
captureState = _4[0],
|
|
14979
|
+
setCaptureState = _4[1];
|
|
14939
14980
|
React.useEffect(function () {
|
|
14940
14981
|
if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
|
|
14941
14982
|
}, [captureState, skipIdCapture]);
|
|
@@ -14966,9 +15007,9 @@
|
|
|
14966
15007
|
var onVideoCaptureFaceNotDetected = React.useCallback(function () {
|
|
14967
15008
|
setCaptureState('CHECKING_LIVENESS');
|
|
14968
15009
|
}, []);
|
|
14969
|
-
var
|
|
14970
|
-
attempt =
|
|
14971
|
-
setAttempt =
|
|
15010
|
+
var _5 = React.useState(0),
|
|
15011
|
+
attempt = _5[0],
|
|
15012
|
+
setAttempt = _5[1];
|
|
14972
15013
|
var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
|
|
14973
15014
|
var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
|
|
14974
15015
|
userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
|
|
@@ -15009,11 +15050,13 @@
|
|
|
15009
15050
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied,
|
|
15010
15051
|
debugMode: debugMode
|
|
15011
15052
|
}, /*#__PURE__*/React__default['default'].createElement(IdCaptureModelsProvider, {
|
|
15053
|
+
autoStart: false,
|
|
15012
15054
|
documentDetectionModelUrl: (_c = (_b = idCaptureProps.assets) === null || _b === void 0 ? void 0 : _b.documentDetectionModelUrl) !== null && _c !== void 0 ? _c : '',
|
|
15013
15055
|
focusModelUrl: (_e = (_d = idCaptureProps.assets) === null || _d === void 0 ? void 0 : _d.focusModelUrl) !== null && _e !== void 0 ? _e : '',
|
|
15014
15056
|
onModelError: onIdCaptureModelError,
|
|
15015
15057
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs
|
|
15016
15058
|
}, /*#__PURE__*/React__default['default'].createElement(SelfieGuidanceModelsProvider, {
|
|
15059
|
+
autoStart: false,
|
|
15017
15060
|
onModelError: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onModelError,
|
|
15018
15061
|
modelLoadTimeoutMs: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.modelLoadTimeoutMs
|
|
15019
15062
|
}, /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
@@ -15082,6 +15125,7 @@
|
|
|
15082
15125
|
readTextPrompt: readTextPrompt,
|
|
15083
15126
|
readTextTimeoutDurationMs: readTextTimeoutDurationMs,
|
|
15084
15127
|
readTextMinReadingMs: readTextMinReadingMs,
|
|
15128
|
+
mergeAVStreams: mergeAVStreams,
|
|
15085
15129
|
assets: assets.idVideoCapture,
|
|
15086
15130
|
classNames: classNames.idVideoCapture,
|
|
15087
15131
|
colors: colors.idVideoCapture,
|
|
@@ -15280,6 +15324,7 @@
|
|
|
15280
15324
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied,
|
|
15281
15325
|
debugMode: debugMode
|
|
15282
15326
|
}, /*#__PURE__*/React__default['default'].createElement(SelfieGuidanceModelsProvider, {
|
|
15327
|
+
autoStart: false,
|
|
15283
15328
|
onModelError: faceLivenessProps.onModelError,
|
|
15284
15329
|
modelLoadTimeoutMs: faceLivenessProps.modelLoadTimeoutMs
|
|
15285
15330
|
}, /*#__PURE__*/React__default['default'].createElement(FaceLivenessWizard, __assign$1({}, faceLivenessProps, {
|
|
@@ -15299,10 +15344,15 @@
|
|
|
15299
15344
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
15300
15345
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied,
|
|
15301
15346
|
debugMode: debugMode
|
|
15347
|
+
}, /*#__PURE__*/React__default['default'].createElement(SelfieGuidanceModelsProvider, {
|
|
15348
|
+
autoStart: false,
|
|
15349
|
+
throttleMs: 250,
|
|
15350
|
+
onModelError: videoSignatureCaptureProps.onModelError,
|
|
15351
|
+
modelLoadTimeoutMs: videoSignatureCaptureProps.modelLoadTimeoutMs
|
|
15302
15352
|
}, /*#__PURE__*/React__default['default'].createElement(VideoSignatureWizard, __assign$1({}, videoSignatureCaptureProps, {
|
|
15303
15353
|
onComplete: onVideoSignatureComplete,
|
|
15304
15354
|
onRetryClicked: onVideoSignatureRetry
|
|
15305
|
-
})));
|
|
15355
|
+
}))));
|
|
15306
15356
|
case 'AdditionalDocumentCapture':
|
|
15307
15357
|
return /*#__PURE__*/React__default['default'].createElement(AdditionalDocumentCaptureWizard, __assign$1({}, additionalDocumentCaptureProps, {
|
|
15308
15358
|
documents: documents,
|
|
@@ -16629,6 +16679,16 @@
|
|
|
16629
16679
|
var _m = React.useContext(CameraStateContext),
|
|
16630
16680
|
cameraAccessDenied = _m.cameraAccessDenied,
|
|
16631
16681
|
releaseCameraAccess = _m.releaseCameraAccess;
|
|
16682
|
+
var _o = React.useContext(SelfieGuidanceModelsContext),
|
|
16683
|
+
start = _o.start,
|
|
16684
|
+
stop = _o.stop;
|
|
16685
|
+
React.useEffect(function () {
|
|
16686
|
+
if (captureState !== 'CAPTURING') return;
|
|
16687
|
+
start();
|
|
16688
|
+
return function () {
|
|
16689
|
+
stop();
|
|
16690
|
+
};
|
|
16691
|
+
}, [captureState, start, stop]);
|
|
16632
16692
|
var onCustomerMatchedCallback = React.useCallback(function (resp, req) {
|
|
16633
16693
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
16634
16694
|
return __generator(this, function (_a) {
|
|
@@ -16651,9 +16711,9 @@
|
|
|
16651
16711
|
setCaptureState('FAILED');
|
|
16652
16712
|
onCaptureGuidanceTimeout === null || onCaptureGuidanceTimeout === void 0 ? void 0 : onCaptureGuidanceTimeout();
|
|
16653
16713
|
}, [onCaptureGuidanceTimeout]);
|
|
16654
|
-
var
|
|
16655
|
-
attempt =
|
|
16656
|
-
setAttempt =
|
|
16714
|
+
var _p = React.useState(0),
|
|
16715
|
+
attempt = _p[0],
|
|
16716
|
+
setAttempt = _p[1];
|
|
16657
16717
|
var onExitCallback = React.useCallback(function () {
|
|
16658
16718
|
setAttempt(function (n) {
|
|
16659
16719
|
return n + 1;
|
|
@@ -16827,6 +16887,7 @@
|
|
|
16827
16887
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
16828
16888
|
debugMode: debugMode
|
|
16829
16889
|
}, /*#__PURE__*/React__default['default'].createElement(SelfieGuidanceModelsProvider, {
|
|
16890
|
+
autoStart: false,
|
|
16830
16891
|
onModelError: onModelError,
|
|
16831
16892
|
modelLoadTimeoutMs: modelLoadTimeoutMs
|
|
16832
16893
|
}, /*#__PURE__*/React__default['default'].createElement(CustomerVerificationWizard, {
|
|
@@ -17173,6 +17234,16 @@
|
|
|
17173
17234
|
var _m = React.useContext(CameraStateContext),
|
|
17174
17235
|
cameraAccessDenied = _m.cameraAccessDenied,
|
|
17175
17236
|
releaseCameraAccess = _m.releaseCameraAccess;
|
|
17237
|
+
var _o = React.useContext(SelfieGuidanceModelsContext),
|
|
17238
|
+
start = _o.start,
|
|
17239
|
+
stop = _o.stop;
|
|
17240
|
+
React.useEffect(function () {
|
|
17241
|
+
if (captureState !== 'CAPTURING') return;
|
|
17242
|
+
start();
|
|
17243
|
+
return function () {
|
|
17244
|
+
stop();
|
|
17245
|
+
};
|
|
17246
|
+
}, [captureState, start, stop]);
|
|
17176
17247
|
var onCustomerMatchedCallback = React.useCallback(function (resp, req) {
|
|
17177
17248
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
17178
17249
|
return __generator(this, function (_a) {
|
|
@@ -17195,9 +17266,9 @@
|
|
|
17195
17266
|
setCaptureState('FAILED');
|
|
17196
17267
|
onCaptureGuidanceTimeout === null || onCaptureGuidanceTimeout === void 0 ? void 0 : onCaptureGuidanceTimeout();
|
|
17197
17268
|
}, [onCaptureGuidanceTimeout]);
|
|
17198
|
-
var
|
|
17199
|
-
attempt =
|
|
17200
|
-
setAttempt =
|
|
17269
|
+
var _p = React.useState(0),
|
|
17270
|
+
attempt = _p[0],
|
|
17271
|
+
setAttempt = _p[1];
|
|
17201
17272
|
var onExitCallback = React.useCallback(function () {
|
|
17202
17273
|
setAttempt(function (n) {
|
|
17203
17274
|
return n + 1;
|
|
@@ -17369,6 +17440,7 @@
|
|
|
17369
17440
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
17370
17441
|
debugMode: debugMode
|
|
17371
17442
|
}, /*#__PURE__*/React__default['default'].createElement(SelfieGuidanceModelsProvider, {
|
|
17443
|
+
autoStart: false,
|
|
17372
17444
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
17373
17445
|
onModelError: onModelError
|
|
17374
17446
|
}, /*#__PURE__*/React__default['default'].createElement(CustomerIdentificationWizard, {
|
|
@@ -17553,28 +17625,30 @@
|
|
|
17553
17625
|
disableFaceDetectionWhileAudioCaptureMsDelay = _w === void 0 ? 2000 : _w,
|
|
17554
17626
|
_x = _a.silentFallback,
|
|
17555
17627
|
silentFallback = _x === void 0 ? false : _x,
|
|
17556
|
-
_y = _a.
|
|
17557
|
-
|
|
17558
|
-
_z = _a.
|
|
17559
|
-
|
|
17560
|
-
_0 = _a.
|
|
17561
|
-
|
|
17562
|
-
_1 = _a.
|
|
17563
|
-
|
|
17564
|
-
_2 = _a.
|
|
17565
|
-
|
|
17566
|
-
_3 = _a.
|
|
17567
|
-
|
|
17568
|
-
_4 = _a.
|
|
17569
|
-
|
|
17570
|
-
_5 = _a.
|
|
17571
|
-
|
|
17572
|
-
_6 = _a.
|
|
17573
|
-
|
|
17574
|
-
_7 = _a.
|
|
17575
|
-
|
|
17576
|
-
_8 = _a.
|
|
17577
|
-
|
|
17628
|
+
_y = _a.mergeAVStreams,
|
|
17629
|
+
mergeAVStreams = _y === void 0 ? false : _y,
|
|
17630
|
+
_z = _a.theme,
|
|
17631
|
+
theme = _z === void 0 ? 'default' : _z,
|
|
17632
|
+
_0 = _a.assets,
|
|
17633
|
+
assets = _0 === void 0 ? {} : _0,
|
|
17634
|
+
_1 = _a.classNames,
|
|
17635
|
+
classNames = _1 === void 0 ? {} : _1,
|
|
17636
|
+
_2 = _a.colors,
|
|
17637
|
+
colors = _2 === void 0 ? {} : _2,
|
|
17638
|
+
_3 = _a.verbiage,
|
|
17639
|
+
verbiage = _3 === void 0 ? {} : _3,
|
|
17640
|
+
_4 = _a.captureSignature,
|
|
17641
|
+
captureSignature = _4 === void 0 ? false : _4,
|
|
17642
|
+
_5 = _a.captureSignatureVideo,
|
|
17643
|
+
captureSignatureVideo = _5 === void 0 ? false : _5,
|
|
17644
|
+
_6 = _a.captureAdditionalDocuments,
|
|
17645
|
+
captureAdditionalDocuments = _6 === void 0 ? [] : _6,
|
|
17646
|
+
_7 = _a.geolocationEnabled,
|
|
17647
|
+
geolocationEnabled = _7 === void 0 ? true : _7,
|
|
17648
|
+
_8 = _a.geolocationRequired,
|
|
17649
|
+
geolocationRequired = _8 === void 0 ? false : _8,
|
|
17650
|
+
_9 = _a.debugMode,
|
|
17651
|
+
debugMode = _9 === void 0 ? false : _9;
|
|
17578
17652
|
useLanguage(lang);
|
|
17579
17653
|
useDebugLogging(debugMode);
|
|
17580
17654
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
@@ -17605,13 +17679,14 @@
|
|
|
17605
17679
|
disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
|
|
17606
17680
|
disableFaceDetectionWhileAudioCaptureMsDelay: disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
17607
17681
|
silentFallback: silentFallback,
|
|
17682
|
+
mergeAVStreams: mergeAVStreams,
|
|
17608
17683
|
assets: assets,
|
|
17609
17684
|
classNames: classNames,
|
|
17610
17685
|
colors: colors,
|
|
17611
17686
|
verbiage: verbiage,
|
|
17612
17687
|
debugMode: debugMode
|
|
17613
17688
|
};
|
|
17614
|
-
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, assets, classNames, colors, verbiage, debugMode]);
|
|
17689
|
+
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
17615
17690
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
17616
17691
|
return {
|
|
17617
17692
|
documents: captureAdditionalDocuments,
|