idmission-web-sdk 1.0.320 → 1.0.322

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.
@@ -119,6 +119,10 @@ export interface VideoIdValidationProps extends PropsWithChildren {
119
119
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
120
120
  /** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
121
121
  faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
122
+ /** Boolean to disable face detection during audio capture after X seconds as defined by disableFaceDetectionWhileAudioCaptureMsDelay. Defaults to false. */
123
+ disableFaceDetectionWhileAudioCapture?: boolean;
124
+ /** Number of milliseconds after which face detection will be disabled if disableFaceDetectionWhileAudioCapture is set to true. Defaults to 2000. */
125
+ disableFaceDetectionWhileAudioCaptureMsDelay?: number;
122
126
  /** Name of an included theme or object containing theme properties. **/
123
127
  theme?: ThemeInput;
124
128
  /** Object containing any asset overrides. */
@@ -48,10 +48,12 @@ export type IdVideoCaptureProps = {
48
48
  captureCountdownSeconds?: number;
49
49
  readTextPrompt?: CustomerSuppliedVerbiage;
50
50
  readTextTimeoutDurationMs?: number;
51
+ disableFaceDetectionWhileAudioCapture: boolean;
52
+ disableFaceDetectionWhileAudioCaptureMsDelay: number;
51
53
  assets?: IdVideoCaptureAssets;
52
54
  classNames?: IdVideoCaptureClassNames;
53
55
  colors?: IdVideoCaptureColors;
54
56
  verbiage?: IdVideoCaptureVerbiage;
55
57
  debugMode?: boolean;
56
58
  };
57
- export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, idCaptureModelsEnabled, idCardFrontDelay, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, skipShowIdCardBack, captureCountdownSeconds, readTextPrompt, readTextTimeoutDurationMs, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
59
+ export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, idCaptureModelsEnabled, idCardFrontDelay, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, skipShowIdCardBack, captureCountdownSeconds, readTextPrompt, readTextTimeoutDurationMs, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
@@ -21,6 +21,8 @@ export type IdVideoCaptureSuccessVerbiage = {
21
21
  headingText?: CustomerSuppliedVerbiage;
22
22
  retryBtnText?: CustomerSuppliedVerbiage;
23
23
  doneBtnText?: CustomerSuppliedVerbiage;
24
+ idFrontText?: CustomerSuppliedVerbiage;
25
+ idBackText?: CustomerSuppliedVerbiage;
24
26
  };
25
27
  export type IdVideoCaptureSuccessProps = {
26
28
  videoUrl: string;
@@ -59,10 +59,12 @@ export type VideoIdWizardProps = {
59
59
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
60
60
  idCaptureModelLoadTimeoutMs?: number;
61
61
  faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
62
+ disableFaceDetectionWhileAudioCapture?: boolean;
63
+ disableFaceDetectionWhileAudioCaptureMsDelay?: number;
62
64
  assets?: VideoIdWizardAssets;
63
65
  classNames?: VideoIdWizardClassNames;
64
66
  colors?: VideoIdWizardColors;
65
67
  verbiage?: VideoIdWizardVerbiage;
66
68
  debugMode?: boolean;
67
69
  };
68
- export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, onIdCaptureModelError, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, faceLivenessLoadingOverlayMode, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
70
+ export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, onIdCaptureModelError, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
@@ -68,8 +68,11 @@ declare const _default: {
68
68
  'Display the front of your ID card...': string;
69
69
  'Display the back of your ID card...': string;
70
70
  'Please move your face to the center...': string;
71
+ 'Searching for ID card...': string;
71
72
  'Please read the following text aloud': string;
72
73
  'Video ID has been successfully captured!': string;
74
+ 'ID Front Image': string;
75
+ 'ID Back Image': string;
73
76
  "We're having some trouble.": string;
74
77
  'On-device capture guidance failed, please capture a selfie manually.': string;
75
78
  'Verifying...': string;
@@ -82,6 +85,8 @@ declare const _default: {
82
85
  'On-device capture guidance failed, please capture a photo of your passport manually.': string;
83
86
  'On-device capture guidance failed, please capture photos of your ID card and passport manually.': string;
84
87
  'On-device capture guidance failed, please capture photos of your ID card or passport manually.': string;
88
+ 'Capture ID page of passport': string;
89
+ 'Capture back of ID card': string;
85
90
  'Downloading...': string;
86
91
  'Accessing camera...': string;
87
92
  'Camera ready': string;
@@ -76,8 +76,11 @@ export declare const resources: {
76
76
  'Display the front of your ID card...': string;
77
77
  'Display the back of your ID card...': string;
78
78
  'Please move your face to the center...': string;
79
+ 'Searching for ID card...': string;
79
80
  'Please read the following text aloud': string;
80
81
  'Video ID has been successfully captured!': string;
82
+ 'ID Front Image': string;
83
+ 'ID Back Image': string;
81
84
  "We're having some trouble.": string;
82
85
  'On-device capture guidance failed, please capture a selfie manually.': string;
83
86
  'Verifying...': string;
@@ -90,6 +93,8 @@ export declare const resources: {
90
93
  'On-device capture guidance failed, please capture a photo of your passport manually.': string;
91
94
  'On-device capture guidance failed, please capture photos of your ID card and passport manually.': string;
92
95
  'On-device capture guidance failed, please capture photos of your ID card or passport manually.': string;
96
+ 'Capture ID page of passport': string;
97
+ 'Capture back of ID card': string;
93
98
  'Downloading...': string;
94
99
  'Accessing camera...': string;
95
100
  'Camera ready': string;
@@ -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.320';
53
+ var webSdkVersion = '1.0.322';
54
54
 
55
55
  function getPlatform() {
56
56
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -10427,8 +10427,11 @@ var esTranslation = {
10427
10427
  'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
10428
10428
  'Display the back of your ID card...': 'Hay que mostrar el reverso de la identificación...',
10429
10429
  'Please move your face to the center...': 'Por favor, hay que mover la cabeza hacia el centro...',
10430
+ 'Searching for ID card...': 'Localizando la identificación...',
10430
10431
  'Please read the following text aloud': 'Hay que leer el siguiente texto en voz alta',
10431
10432
  'Video ID has been successfully captured!': 'Video ID capturado exitosamente!',
10433
+ 'ID Front Image': 'Frente de ID',
10434
+ 'ID Back Image': 'Reverso de ID',
10432
10435
  "We're having some trouble.": 'Se ha presentado un problema.',
10433
10436
  'On-device capture guidance failed, please capture a selfie manually.': 'La captura automática para toma de selfie falló. Por favor, hay que tomarse la selfie manualmente.',
10434
10437
  'Verifying...': 'Verificando....',
@@ -10441,6 +10444,8 @@ var esTranslation = {
10441
10444
  'On-device capture guidance failed, please capture a photo of your passport manually.': 'La captura automática falló. Por favor hay que tomar una foto de la pasaporte manualmente.',
10442
10445
  'On-device capture guidance failed, please capture photos of your ID card and passport manually.': 'La captura automática falló. Por favor hay que tomar una foto de la identificación y del pasaporte manualmente.',
10443
10446
  'On-device capture guidance failed, please capture photos of your ID card or passport manually.': 'La captura automática falló. Por favor hay que tomar una foto de la identificación o del pasaporte manualmente.',
10447
+ 'Capture ID page of passport': 'Captura pasaporte (página de la foto)',
10448
+ 'Capture back of ID card': 'Captura del reverso',
10444
10449
  'Downloading...': 'Descargando...',
10445
10450
  'Accessing camera...': 'Accediendo a la cámara',
10446
10451
  'Camera ready': 'Cámara está lista',
@@ -16171,62 +16176,66 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16171
16176
  readTextPrompt = _a.readTextPrompt,
16172
16177
  _4 = _a.readTextTimeoutDurationMs,
16173
16178
  readTextTimeoutDurationMs = _4 === void 0 ? 15000 : _4,
16174
- _5 = _a.assets,
16175
- assets = _5 === void 0 ? {} : _5,
16176
- _6 = _a.classNames,
16177
- classNames = _6 === void 0 ? {} : _6,
16178
- _7 = _a.colors,
16179
- colors = _7 === void 0 ? {} : _7,
16180
- _8 = _a.verbiage,
16181
- rawVerbiage = _8 === void 0 ? {} : _8,
16182
- _9 = _a.debugMode,
16183
- debugMode = _9 === void 0 ? false : _9;
16184
- var _10 = useResizeObserver__default['default'](),
16185
- ref = _10.ref,
16186
- _11 = _10.width,
16187
- width = _11 === void 0 ? 1 : _11,
16188
- _12 = _10.height,
16189
- height = _12 === void 0 ? 1 : _12;
16190
- var _13 = React.useContext(CameraStateContext),
16191
- cameraRef = _13.cameraRef,
16192
- videoRef = _13.videoRef,
16193
- videoLoaded = _13.videoLoaded,
16194
- cameraReady = _13.cameraReady,
16195
- microphoneReady = _13.microphoneReady,
16196
- audioStream = _13.audioStream,
16197
- setVideoLoaded = _13.setVideoLoaded,
16198
- takePhoto = _13.takePhoto;
16199
- var _14 = React.useState([]),
16200
- detectedObjects = _14[0],
16201
- setDetectedObjects = _14[1];
16202
- var _15 = React.useState([]),
16203
- faces = _15[0],
16204
- setFaces = _15[1];
16205
- var _16 = React.useContext(IdCaptureModelsContext),
16206
- idModelsReady = _16.ready,
16207
- idModelsWorking = _16.working,
16208
- makeIdPrediction = _16.makePrediction,
16209
- onIdPredictionMade = _16.onPredictionMade,
16210
- setThresholds = _16.setThresholds,
16211
- bestFrameDetectionScore = _16.bestFrameDetectionScore,
16212
- bestFrameFocusScore = _16.bestFrameFocusScore,
16213
- resetBestFrame = _16.resetBestFrame,
16214
- modelError = _16.modelError;
16215
- var _17 = React.useState(null),
16216
- videoStartsAt = _17[0],
16217
- setVideoStartsAt = _17[1];
16218
- var _18 = React.useContext(SubmissionContext),
16219
- setIdCaptureVideoAudioStartsAt = _18.setIdCaptureVideoAudioStartsAt,
16220
- setExpectedAudioText = _18.setExpectedAudioText;
16179
+ _5 = _a.disableFaceDetectionWhileAudioCapture,
16180
+ disableFaceDetectionWhileAudioCapture = _5 === void 0 ? false : _5,
16181
+ _6 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
16182
+ disableFaceDetectionWhileAudioCaptureMsDelay = _6 === void 0 ? 2000 : _6,
16183
+ _7 = _a.assets,
16184
+ assets = _7 === void 0 ? {} : _7,
16185
+ _8 = _a.classNames,
16186
+ classNames = _8 === void 0 ? {} : _8,
16187
+ _9 = _a.colors,
16188
+ colors = _9 === void 0 ? {} : _9,
16189
+ _10 = _a.verbiage,
16190
+ rawVerbiage = _10 === void 0 ? {} : _10,
16191
+ _11 = _a.debugMode,
16192
+ debugMode = _11 === void 0 ? false : _11;
16193
+ var _12 = useResizeObserver__default['default'](),
16194
+ ref = _12.ref,
16195
+ _13 = _12.width,
16196
+ width = _13 === void 0 ? 1 : _13,
16197
+ _14 = _12.height,
16198
+ height = _14 === void 0 ? 1 : _14;
16199
+ var _15 = React.useContext(CameraStateContext),
16200
+ cameraRef = _15.cameraRef,
16201
+ videoRef = _15.videoRef,
16202
+ videoLoaded = _15.videoLoaded,
16203
+ cameraReady = _15.cameraReady,
16204
+ microphoneReady = _15.microphoneReady,
16205
+ audioStream = _15.audioStream,
16206
+ setVideoLoaded = _15.setVideoLoaded,
16207
+ takePhoto = _15.takePhoto;
16208
+ var _16 = React.useState([]),
16209
+ detectedObjects = _16[0],
16210
+ setDetectedObjects = _16[1];
16211
+ var _17 = React.useState([]),
16212
+ faces = _17[0],
16213
+ setFaces = _17[1];
16214
+ var _18 = React.useContext(IdCaptureModelsContext),
16215
+ idModelsReady = _18.ready,
16216
+ idModelsWorking = _18.working,
16217
+ makeIdPrediction = _18.makePrediction,
16218
+ onIdPredictionMade = _18.onPredictionMade,
16219
+ setThresholds = _18.setThresholds,
16220
+ bestFrameDetectionScore = _18.bestFrameDetectionScore,
16221
+ bestFrameFocusScore = _18.bestFrameFocusScore,
16222
+ resetBestFrame = _18.resetBestFrame,
16223
+ modelError = _18.modelError;
16224
+ var _19 = React.useState(null),
16225
+ videoStartsAt = _19[0],
16226
+ setVideoStartsAt = _19[1];
16227
+ var _20 = React.useContext(SubmissionContext),
16228
+ setIdCaptureVideoAudioStartsAt = _20.setIdCaptureVideoAudioStartsAt,
16229
+ setExpectedAudioText = _20.setExpectedAudioText;
16221
16230
  var onSelfiePredictionMade = React.useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
16222
- var _19 = useVideoRecorder(cameraRef.current, audioStream),
16223
- isRecordingVideo = _19.isRecordingVideo,
16224
- startRecordingVideo = _19.startRecordingVideo,
16225
- startRecordingAudio = _19.startRecordingAudio,
16226
- stopRecordingVideo = _19.stopRecordingVideo,
16227
- stopRecordingAudio = _19.stopRecordingAudio,
16228
- videoUrl = _19.videoUrl,
16229
- audioUrl = _19.audioUrl;
16231
+ var _21 = useVideoRecorder(cameraRef.current, audioStream),
16232
+ isRecordingVideo = _21.isRecordingVideo,
16233
+ startRecordingVideo = _21.startRecordingVideo,
16234
+ startRecordingAudio = _21.startRecordingAudio,
16235
+ stopRecordingVideo = _21.stopRecordingVideo,
16236
+ stopRecordingAudio = _21.stopRecordingAudio,
16237
+ videoUrl = _21.videoUrl,
16238
+ audioUrl = _21.audioUrl;
16230
16239
  React.useEffect(function () {
16231
16240
  if (!isRecordingVideo && !videoUrl) {
16232
16241
  startRecordingVideo();
@@ -16242,9 +16251,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16242
16251
  React.useEffect(function () {
16243
16252
  shouldCaptureFrames.current = videoLoaded && cameraReady && idModelsReady && (!readTextPrompt || microphoneReady);
16244
16253
  }, [cameraReady, idModelsReady, microphoneReady, readTextPrompt, videoLoaded]);
16245
- var _20 = React.useState('SHOW_ID_FRONT'),
16246
- requestedAction = _20[0],
16247
- setRequestedAction = _20[1];
16254
+ var _22 = React.useState('SHOW_ID_FRONT'),
16255
+ requestedAction = _22[0],
16256
+ setRequestedAction = _22[1];
16248
16257
  React.useEffect(function () {
16249
16258
  if (requestedAction !== 'SHOW_ID_FRONT' && requestedAction !== 'SHOW_ID_BACK') return;
16250
16259
  if (!idCaptureModelsEnabled || !idModelsReady || !cameraReady || !videoLoaded) return;
@@ -16272,15 +16281,15 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16272
16281
  }
16273
16282
  });
16274
16283
  }, [idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, requestedAction, setThresholds]);
16275
- var _21 = React.useState(0),
16276
- currentDetectionScore = _21[0],
16277
- setCurrentDetectionScore = _21[1];
16278
- var _22 = React.useState(0),
16279
- currentFocusScore = _22[0],
16280
- setCurrentFocusScore = _22[1];
16281
16284
  var _23 = React.useState(0),
16282
- goodFramesCount = _23[0],
16283
- setGoodFramesCount = _23[1];
16285
+ currentDetectionScore = _23[0],
16286
+ setCurrentDetectionScore = _23[1];
16287
+ var _24 = React.useState(0),
16288
+ currentFocusScore = _24[0],
16289
+ setCurrentFocusScore = _24[1];
16290
+ var _25 = React.useState(0),
16291
+ goodFramesCount = _25[0],
16292
+ setGoodFramesCount = _25[1];
16284
16293
  var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? goodIdCardFrontFramesThreshold : goodIdCardBackFramesThreshold;
16285
16294
  var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
16286
16295
  React.useEffect(function () {
@@ -16298,9 +16307,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16298
16307
  }
16299
16308
  });
16300
16309
  }, [idCaptureModelsEnabled, idCardFrontDetectionThreshold, onIdPredictionMade]);
16301
- var _24 = React.useState(null),
16302
- idFrontCaptureStartedAt = _24[0],
16303
- setFirstGoodFrameTime = _24[1];
16310
+ var _26 = React.useState(null),
16311
+ idFrontCaptureStartedAt = _26[0],
16312
+ setFirstGoodFrameTime = _26[1];
16304
16313
  React.useEffect(function () {
16305
16314
  if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
16306
16315
  }, [goodFramesCount]);
@@ -16321,9 +16330,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16321
16330
  var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
16322
16331
  var faceBox = (_f = faces === null || faces === void 0 ? void 0 : faces[0]) === null || _f === void 0 ? void 0 : _f.box;
16323
16332
  var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
16324
- var _25 = React.useState(),
16325
- countdownStartedAt = _25[0],
16326
- setCountdownStartedAt = _25[1];
16333
+ var _27 = React.useState(),
16334
+ countdownStartedAt = _27[0],
16335
+ setCountdownStartedAt = _27[1];
16327
16336
  var frameLock = React.useRef(false);
16328
16337
  var captureFrame = React.useCallback(function () {
16329
16338
  return tslib.__awaiter(void 0, void 0, void 0, function () {
@@ -16421,9 +16430,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16421
16430
  };
16422
16431
  }, [captureCountdownSeconds, captureFrame, countdownStartedAt]);
16423
16432
  var timeoutStartedAt = useTimeout(readTextTimeoutDurationMs, stopRecording, requestedAction !== 'READ_TEXT', false, requestedAction === 'READ_TEXT').timeoutStartedAt;
16424
- var _26 = React.useState(0),
16425
- numFramesWithoutFaces = _26[0],
16426
- setNumFramesWithoutFaces = _26[1];
16433
+ var _28 = React.useState(0),
16434
+ numFramesWithoutFaces = _28[0],
16435
+ setNumFramesWithoutFaces = _28[1];
16427
16436
  React.useEffect(function () {
16428
16437
  onSelfiePredictionMade(function (faces) {
16429
16438
  setFaces(faces);
@@ -16433,19 +16442,20 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16433
16442
  });
16434
16443
  }, [onSelfiePredictionMade]);
16435
16444
  React.useEffect(function () {
16436
- if (numFramesWithoutFaces >= 2) {
16445
+ var ignoreMissingFaces = disableFaceDetectionWhileAudioCapture && (timeoutStartedAt === null || timeoutStartedAt === void 0 ? void 0 : timeoutStartedAt.getTime()) && new Date().getTime() - (timeoutStartedAt === null || timeoutStartedAt === void 0 ? void 0 : timeoutStartedAt.getTime()) > disableFaceDetectionWhileAudioCaptureMsDelay;
16446
+ if (!ignoreMissingFaces && numFramesWithoutFaces >= 2) {
16437
16447
  onFaceNotDetected === null || onFaceNotDetected === void 0 ? void 0 : onFaceNotDetected();
16438
16448
  }
16439
16449
  }, [numFramesWithoutFaces, onFaceNotDetected]);
16440
16450
  var theme = styled.useTheme();
16441
- var _27 = useTranslations(rawVerbiage, {
16451
+ var _29 = useTranslations(rawVerbiage, {
16442
16452
  faceNotCenteredText: 'Please move your face to the center...',
16443
16453
  searchingForIdCardText: 'Searching for ID card...',
16444
16454
  captureBtnText: 'Capture'
16445
16455
  }),
16446
- captureBtnText = _27.captureBtnText,
16447
- faceNotCenteredText = _27.faceNotCenteredText,
16448
- searchingForIdCardText = _27.searchingForIdCardText;
16456
+ captureBtnText = _29.captureBtnText,
16457
+ faceNotCenteredText = _29.faceNotCenteredText,
16458
+ searchingForIdCardText = _29.searchingForIdCardText;
16449
16459
  var debugScalingDetails = useDebugScalingDetails({
16450
16460
  enabled: debugMode,
16451
16461
  pageWidth: width,
@@ -16538,7 +16548,9 @@ var IdVideoCaptureSuccess = function IdVideoCaptureSuccess(_a) {
16538
16548
  var verbiage = useTranslations(rawVerbiage, {
16539
16549
  headingText: 'Video ID has been successfully captured!',
16540
16550
  retryBtnText: 'Retry',
16541
- doneBtnText: 'Done'
16551
+ doneBtnText: 'Done',
16552
+ idFrontText: 'ID Front Image',
16553
+ idBackText: 'ID Back Image'
16542
16554
  });
16543
16555
  return /*#__PURE__*/React__default['default'].createElement(OverlayContainer, {
16544
16556
  className: classNames.container
@@ -16584,7 +16596,7 @@ var IdVideoCaptureSuccess = function IdVideoCaptureSuccess(_a) {
16584
16596
  }
16585
16597
  }), /*#__PURE__*/React__default['default'].createElement("label", {
16586
16598
  htmlFor: "displayedAssetIdFrontImage"
16587
- }, "ID Front Image")), idBackImageUrl && ( /*#__PURE__*/React__default['default'].createElement(AssetSelectorOption, {
16599
+ }, verbiage.idFrontText)), idBackImageUrl && ( /*#__PURE__*/React__default['default'].createElement(AssetSelectorOption, {
16588
16600
  className: classNames.assetSelectorOption
16589
16601
  }, /*#__PURE__*/React__default['default'].createElement("input", {
16590
16602
  type: "radio",
@@ -16596,7 +16608,7 @@ var IdVideoCaptureSuccess = function IdVideoCaptureSuccess(_a) {
16596
16608
  }
16597
16609
  }), /*#__PURE__*/React__default['default'].createElement("label", {
16598
16610
  htmlFor: "displayedAssetIdBackImage"
16599
- }, "ID Back Image")))), /*#__PURE__*/React__default['default'].createElement(OverlayImageContainer, {
16611
+ }, verbiage.idBackText)))), /*#__PURE__*/React__default['default'].createElement(OverlayImageContainer, {
16600
16612
  className: classNames.videoContainer
16601
16613
  }, displayedAsset === 'video' ? ( /*#__PURE__*/React__default['default'].createElement(StyledVideo, {
16602
16614
  src: videoUrl,
@@ -16675,29 +16687,33 @@ var VideoIdWizard = function VideoIdWizard(_a) {
16675
16687
  idCaptureModelLoadTimeoutMs = _s === void 0 ? defaultIdCaptureModelLoadTimeoutMs : _s,
16676
16688
  _t = _a.faceLivenessLoadingOverlayMode,
16677
16689
  faceLivenessLoadingOverlayMode = _t === void 0 ? 'default' : _t,
16678
- _u = _a.assets,
16679
- assets = _u === void 0 ? {} : _u,
16680
- _v = _a.classNames,
16681
- classNames = _v === void 0 ? {} : _v,
16682
- _w = _a.colors,
16683
- colors = _w === void 0 ? {} : _w,
16684
- _x = _a.verbiage,
16685
- verbiage = _x === void 0 ? {} : _x,
16686
- _y = _a.debugMode,
16687
- debugMode = _y === void 0 ? false : _y;
16688
- var _z = React.useContext(SubmissionContext),
16689
- submissionStatus = _z.submissionStatus,
16690
- idCaptureVideoUrl = _z.idCaptureVideoUrl,
16691
- idCaptureVideoAudioUrl = _z.idCaptureVideoAudioUrl,
16692
- idCaptureVideoIdFrontImage = _z.idCaptureVideoIdFrontImage,
16693
- idCaptureVideoIdBackImage = _z.idCaptureVideoIdBackImage,
16694
- setIdCaptureVideoUrl = _z.setIdCaptureVideoUrl,
16695
- setIdCaptureVideoIdFrontImage = _z.setIdCaptureVideoIdFrontImage,
16696
- setIdCaptureVideoIdBackImage = _z.setIdCaptureVideoIdBackImage,
16697
- setIdCaptureVideoAudioUrl = _z.setIdCaptureVideoAudioUrl;
16698
- var _0 = React.useState('CAPTURING_ID'),
16699
- captureState = _0[0],
16700
- setCaptureState = _0[1];
16690
+ _u = _a.disableFaceDetectionWhileAudioCapture,
16691
+ disableFaceDetectionWhileAudioCapture = _u === void 0 ? true : _u,
16692
+ _v = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
16693
+ disableFaceDetectionWhileAudioCaptureMsDelay = _v === void 0 ? 2000 : _v,
16694
+ _w = _a.assets,
16695
+ assets = _w === void 0 ? {} : _w,
16696
+ _x = _a.classNames,
16697
+ classNames = _x === void 0 ? {} : _x,
16698
+ _y = _a.colors,
16699
+ colors = _y === void 0 ? {} : _y,
16700
+ _z = _a.verbiage,
16701
+ verbiage = _z === void 0 ? {} : _z,
16702
+ _0 = _a.debugMode,
16703
+ debugMode = _0 === void 0 ? false : _0;
16704
+ var _1 = React.useContext(SubmissionContext),
16705
+ submissionStatus = _1.submissionStatus,
16706
+ idCaptureVideoUrl = _1.idCaptureVideoUrl,
16707
+ idCaptureVideoAudioUrl = _1.idCaptureVideoAudioUrl,
16708
+ idCaptureVideoIdFrontImage = _1.idCaptureVideoIdFrontImage,
16709
+ idCaptureVideoIdBackImage = _1.idCaptureVideoIdBackImage,
16710
+ setIdCaptureVideoUrl = _1.setIdCaptureVideoUrl,
16711
+ setIdCaptureVideoIdFrontImage = _1.setIdCaptureVideoIdFrontImage,
16712
+ setIdCaptureVideoIdBackImage = _1.setIdCaptureVideoIdBackImage,
16713
+ setIdCaptureVideoAudioUrl = _1.setIdCaptureVideoAudioUrl;
16714
+ var _2 = React.useState('CAPTURING_ID'),
16715
+ captureState = _2[0],
16716
+ setCaptureState = _2[1];
16701
16717
  React.useEffect(function () {
16702
16718
  if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
16703
16719
  }, [captureState, skipIdCapture]);
@@ -16728,9 +16744,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
16728
16744
  var onVideoCaptureFaceNotDetected = React.useCallback(function () {
16729
16745
  setCaptureState('CHECKING_LIVENESS');
16730
16746
  }, []);
16731
- var _1 = React.useState(0),
16732
- attempt = _1[0],
16733
- setAttempt = _1[1];
16747
+ var _3 = React.useState(0),
16748
+ attempt = _3[0],
16749
+ setAttempt = _3[1];
16734
16750
  var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
16735
16751
  var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
16736
16752
  userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
@@ -16829,6 +16845,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
16829
16845
  goodIdCardFrontFramesThreshold: goodIdCardFrontFramesThreshold,
16830
16846
  goodIdCardBackFramesThreshold: goodIdCardBackFramesThreshold,
16831
16847
  skipShowIdCardBack: skipShowIdCardBack,
16848
+ disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
16849
+ disableFaceDetectionWhileAudioCaptureMsDelay: disableFaceDetectionWhileAudioCaptureMsDelay,
16832
16850
  readTextPrompt: readTextPrompt,
16833
16851
  readTextTimeoutDurationMs: readTextTimeoutDurationMs,
16834
16852
  assets: assets.idVideoCapture,
@@ -19116,28 +19134,32 @@ var VideoIdValidation = function VideoIdValidation(_a) {
19116
19134
  idCaptureRotateLoadingOverlayImageWhenPortrait = _s === void 0 ? true : _s,
19117
19135
  _t = _a.faceLivenessLoadingOverlayMode,
19118
19136
  faceLivenessLoadingOverlayMode = _t === void 0 ? 'default' : _t,
19119
- _u = _a.theme,
19120
- theme = _u === void 0 ? 'default' : _u,
19121
- _v = _a.assets,
19122
- assets = _v === void 0 ? {} : _v,
19123
- _w = _a.classNames,
19124
- classNames = _w === void 0 ? {} : _w,
19125
- _x = _a.colors,
19126
- colors = _x === void 0 ? {} : _x,
19127
- _y = _a.verbiage,
19128
- verbiage = _y === void 0 ? {} : _y,
19129
- _z = _a.captureSignature,
19130
- captureSignature = _z === void 0 ? false : _z,
19131
- _0 = _a.captureSignatureVideo,
19132
- captureSignatureVideo = _0 === void 0 ? false : _0,
19133
- _1 = _a.captureAdditionalDocuments,
19134
- captureAdditionalDocuments = _1 === void 0 ? [] : _1,
19135
- _2 = _a.geolocationEnabled,
19136
- geolocationEnabled = _2 === void 0 ? true : _2,
19137
- _3 = _a.geolocationRequired,
19138
- geolocationRequired = _3 === void 0 ? false : _3,
19139
- _4 = _a.debugMode,
19140
- debugMode = _4 === void 0 ? false : _4;
19137
+ _u = _a.disableFaceDetectionWhileAudioCapture,
19138
+ disableFaceDetectionWhileAudioCapture = _u === void 0 ? false : _u,
19139
+ _v = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
19140
+ disableFaceDetectionWhileAudioCaptureMsDelay = _v === void 0 ? 2000 : _v,
19141
+ _w = _a.theme,
19142
+ theme = _w === void 0 ? 'default' : _w,
19143
+ _x = _a.assets,
19144
+ assets = _x === void 0 ? {} : _x,
19145
+ _y = _a.classNames,
19146
+ classNames = _y === void 0 ? {} : _y,
19147
+ _z = _a.colors,
19148
+ colors = _z === void 0 ? {} : _z,
19149
+ _0 = _a.verbiage,
19150
+ verbiage = _0 === void 0 ? {} : _0,
19151
+ _1 = _a.captureSignature,
19152
+ captureSignature = _1 === void 0 ? false : _1,
19153
+ _2 = _a.captureSignatureVideo,
19154
+ captureSignatureVideo = _2 === void 0 ? false : _2,
19155
+ _3 = _a.captureAdditionalDocuments,
19156
+ captureAdditionalDocuments = _3 === void 0 ? [] : _3,
19157
+ _4 = _a.geolocationEnabled,
19158
+ geolocationEnabled = _4 === void 0 ? true : _4,
19159
+ _5 = _a.geolocationRequired,
19160
+ geolocationRequired = _5 === void 0 ? false : _5,
19161
+ _6 = _a.debugMode,
19162
+ debugMode = _6 === void 0 ? false : _6;
19141
19163
  useLanguage(lang);
19142
19164
  var videoIdCaptureProps = React.useMemo(function () {
19143
19165
  return {
@@ -19163,13 +19185,15 @@ var VideoIdValidation = function VideoIdValidation(_a) {
19163
19185
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
19164
19186
  idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
19165
19187
  faceLivenessLoadingOverlayMode: faceLivenessLoadingOverlayMode,
19188
+ disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
19189
+ disableFaceDetectionWhileAudioCaptureMsDelay: disableFaceDetectionWhileAudioCaptureMsDelay,
19166
19190
  assets: assets,
19167
19191
  classNames: classNames,
19168
19192
  colors: colors,
19169
19193
  verbiage: verbiage,
19170
19194
  debugMode: debugMode
19171
19195
  };
19172
- }, [assets, classNames, colors, debugMode, faceLivenessLoadingOverlayMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCaptureLoadingOverlayMode, idCaptureModelsEnabled, idCapturePortraitGuidesOnMobile, idCaptureProps, idCaptureRotateLoadingOverlayImageWhenPortrait, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
19196
+ }, [assets, classNames, colors, debugMode, faceLivenessLoadingOverlayMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCaptureLoadingOverlayMode, idCaptureModelsEnabled, idCapturePortraitGuidesOnMobile, idCaptureProps, idCaptureRotateLoadingOverlayImageWhenPortrait, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
19173
19197
  var additionalDocumentCaptureProps = React.useMemo(function () {
19174
19198
  return {
19175
19199
  documents: captureAdditionalDocuments,