idmission-web-sdk 1.0.321 → 1.0.323

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;
@@ -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;
@@ -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.321';
53
+ var webSdkVersion = '1.0.323';
54
54
 
55
55
  function getPlatform() {
56
56
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -16176,62 +16176,66 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16176
16176
  readTextPrompt = _a.readTextPrompt,
16177
16177
  _4 = _a.readTextTimeoutDurationMs,
16178
16178
  readTextTimeoutDurationMs = _4 === void 0 ? 15000 : _4,
16179
- _5 = _a.assets,
16180
- assets = _5 === void 0 ? {} : _5,
16181
- _6 = _a.classNames,
16182
- classNames = _6 === void 0 ? {} : _6,
16183
- _7 = _a.colors,
16184
- colors = _7 === void 0 ? {} : _7,
16185
- _8 = _a.verbiage,
16186
- rawVerbiage = _8 === void 0 ? {} : _8,
16187
- _9 = _a.debugMode,
16188
- debugMode = _9 === void 0 ? false : _9;
16189
- var _10 = useResizeObserver__default['default'](),
16190
- ref = _10.ref,
16191
- _11 = _10.width,
16192
- width = _11 === void 0 ? 1 : _11,
16193
- _12 = _10.height,
16194
- height = _12 === void 0 ? 1 : _12;
16195
- var _13 = React.useContext(CameraStateContext),
16196
- cameraRef = _13.cameraRef,
16197
- videoRef = _13.videoRef,
16198
- videoLoaded = _13.videoLoaded,
16199
- cameraReady = _13.cameraReady,
16200
- microphoneReady = _13.microphoneReady,
16201
- audioStream = _13.audioStream,
16202
- setVideoLoaded = _13.setVideoLoaded,
16203
- takePhoto = _13.takePhoto;
16204
- var _14 = React.useState([]),
16205
- detectedObjects = _14[0],
16206
- setDetectedObjects = _14[1];
16207
- var _15 = React.useState([]),
16208
- faces = _15[0],
16209
- setFaces = _15[1];
16210
- var _16 = React.useContext(IdCaptureModelsContext),
16211
- idModelsReady = _16.ready,
16212
- idModelsWorking = _16.working,
16213
- makeIdPrediction = _16.makePrediction,
16214
- onIdPredictionMade = _16.onPredictionMade,
16215
- setThresholds = _16.setThresholds,
16216
- bestFrameDetectionScore = _16.bestFrameDetectionScore,
16217
- bestFrameFocusScore = _16.bestFrameFocusScore,
16218
- resetBestFrame = _16.resetBestFrame,
16219
- modelError = _16.modelError;
16220
- var _17 = React.useState(null),
16221
- videoStartsAt = _17[0],
16222
- setVideoStartsAt = _17[1];
16223
- var _18 = React.useContext(SubmissionContext),
16224
- setIdCaptureVideoAudioStartsAt = _18.setIdCaptureVideoAudioStartsAt,
16225
- 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;
16226
16230
  var onSelfiePredictionMade = React.useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
16227
- var _19 = useVideoRecorder(cameraRef.current, audioStream),
16228
- isRecordingVideo = _19.isRecordingVideo,
16229
- startRecordingVideo = _19.startRecordingVideo,
16230
- startRecordingAudio = _19.startRecordingAudio,
16231
- stopRecordingVideo = _19.stopRecordingVideo,
16232
- stopRecordingAudio = _19.stopRecordingAudio,
16233
- videoUrl = _19.videoUrl,
16234
- 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;
16235
16239
  React.useEffect(function () {
16236
16240
  if (!isRecordingVideo && !videoUrl) {
16237
16241
  startRecordingVideo();
@@ -16247,9 +16251,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16247
16251
  React.useEffect(function () {
16248
16252
  shouldCaptureFrames.current = videoLoaded && cameraReady && idModelsReady && (!readTextPrompt || microphoneReady);
16249
16253
  }, [cameraReady, idModelsReady, microphoneReady, readTextPrompt, videoLoaded]);
16250
- var _20 = React.useState('SHOW_ID_FRONT'),
16251
- requestedAction = _20[0],
16252
- setRequestedAction = _20[1];
16254
+ var _22 = React.useState('SHOW_ID_FRONT'),
16255
+ requestedAction = _22[0],
16256
+ setRequestedAction = _22[1];
16253
16257
  React.useEffect(function () {
16254
16258
  if (requestedAction !== 'SHOW_ID_FRONT' && requestedAction !== 'SHOW_ID_BACK') return;
16255
16259
  if (!idCaptureModelsEnabled || !idModelsReady || !cameraReady || !videoLoaded) return;
@@ -16277,15 +16281,15 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16277
16281
  }
16278
16282
  });
16279
16283
  }, [idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, requestedAction, setThresholds]);
16280
- var _21 = React.useState(0),
16281
- currentDetectionScore = _21[0],
16282
- setCurrentDetectionScore = _21[1];
16283
- var _22 = React.useState(0),
16284
- currentFocusScore = _22[0],
16285
- setCurrentFocusScore = _22[1];
16286
16284
  var _23 = React.useState(0),
16287
- goodFramesCount = _23[0],
16288
- 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];
16289
16293
  var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? goodIdCardFrontFramesThreshold : goodIdCardBackFramesThreshold;
16290
16294
  var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
16291
16295
  React.useEffect(function () {
@@ -16303,9 +16307,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16303
16307
  }
16304
16308
  });
16305
16309
  }, [idCaptureModelsEnabled, idCardFrontDetectionThreshold, onIdPredictionMade]);
16306
- var _24 = React.useState(null),
16307
- idFrontCaptureStartedAt = _24[0],
16308
- setFirstGoodFrameTime = _24[1];
16310
+ var _26 = React.useState(null),
16311
+ idFrontCaptureStartedAt = _26[0],
16312
+ setFirstGoodFrameTime = _26[1];
16309
16313
  React.useEffect(function () {
16310
16314
  if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
16311
16315
  }, [goodFramesCount]);
@@ -16326,9 +16330,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16326
16330
  var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
16327
16331
  var faceBox = (_f = faces === null || faces === void 0 ? void 0 : faces[0]) === null || _f === void 0 ? void 0 : _f.box;
16328
16332
  var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
16329
- var _25 = React.useState(),
16330
- countdownStartedAt = _25[0],
16331
- setCountdownStartedAt = _25[1];
16333
+ var _27 = React.useState(),
16334
+ countdownStartedAt = _27[0],
16335
+ setCountdownStartedAt = _27[1];
16332
16336
  var frameLock = React.useRef(false);
16333
16337
  var captureFrame = React.useCallback(function () {
16334
16338
  return tslib.__awaiter(void 0, void 0, void 0, function () {
@@ -16426,9 +16430,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16426
16430
  };
16427
16431
  }, [captureCountdownSeconds, captureFrame, countdownStartedAt]);
16428
16432
  var timeoutStartedAt = useTimeout(readTextTimeoutDurationMs, stopRecording, requestedAction !== 'READ_TEXT', false, requestedAction === 'READ_TEXT').timeoutStartedAt;
16429
- var _26 = React.useState(0),
16430
- numFramesWithoutFaces = _26[0],
16431
- setNumFramesWithoutFaces = _26[1];
16433
+ var _28 = React.useState(0),
16434
+ numFramesWithoutFaces = _28[0],
16435
+ setNumFramesWithoutFaces = _28[1];
16432
16436
  React.useEffect(function () {
16433
16437
  onSelfiePredictionMade(function (faces) {
16434
16438
  setFaces(faces);
@@ -16438,19 +16442,20 @@ var IdVideoCapture = function IdVideoCapture(_a) {
16438
16442
  });
16439
16443
  }, [onSelfiePredictionMade]);
16440
16444
  React.useEffect(function () {
16441
- 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) {
16442
16447
  onFaceNotDetected === null || onFaceNotDetected === void 0 ? void 0 : onFaceNotDetected();
16443
16448
  }
16444
16449
  }, [numFramesWithoutFaces, onFaceNotDetected]);
16445
16450
  var theme = styled.useTheme();
16446
- var _27 = useTranslations(rawVerbiage, {
16451
+ var _29 = useTranslations(rawVerbiage, {
16447
16452
  faceNotCenteredText: 'Please move your face to the center...',
16448
16453
  searchingForIdCardText: 'Searching for ID card...',
16449
16454
  captureBtnText: 'Capture'
16450
16455
  }),
16451
- captureBtnText = _27.captureBtnText,
16452
- faceNotCenteredText = _27.faceNotCenteredText,
16453
- searchingForIdCardText = _27.searchingForIdCardText;
16456
+ captureBtnText = _29.captureBtnText,
16457
+ faceNotCenteredText = _29.faceNotCenteredText,
16458
+ searchingForIdCardText = _29.searchingForIdCardText;
16454
16459
  var debugScalingDetails = useDebugScalingDetails({
16455
16460
  enabled: debugMode,
16456
16461
  pageWidth: width,
@@ -16682,29 +16687,33 @@ var VideoIdWizard = function VideoIdWizard(_a) {
16682
16687
  idCaptureModelLoadTimeoutMs = _s === void 0 ? defaultIdCaptureModelLoadTimeoutMs : _s,
16683
16688
  _t = _a.faceLivenessLoadingOverlayMode,
16684
16689
  faceLivenessLoadingOverlayMode = _t === void 0 ? 'default' : _t,
16685
- _u = _a.assets,
16686
- assets = _u === void 0 ? {} : _u,
16687
- _v = _a.classNames,
16688
- classNames = _v === void 0 ? {} : _v,
16689
- _w = _a.colors,
16690
- colors = _w === void 0 ? {} : _w,
16691
- _x = _a.verbiage,
16692
- verbiage = _x === void 0 ? {} : _x,
16693
- _y = _a.debugMode,
16694
- debugMode = _y === void 0 ? false : _y;
16695
- var _z = React.useContext(SubmissionContext),
16696
- submissionStatus = _z.submissionStatus,
16697
- idCaptureVideoUrl = _z.idCaptureVideoUrl,
16698
- idCaptureVideoAudioUrl = _z.idCaptureVideoAudioUrl,
16699
- idCaptureVideoIdFrontImage = _z.idCaptureVideoIdFrontImage,
16700
- idCaptureVideoIdBackImage = _z.idCaptureVideoIdBackImage,
16701
- setIdCaptureVideoUrl = _z.setIdCaptureVideoUrl,
16702
- setIdCaptureVideoIdFrontImage = _z.setIdCaptureVideoIdFrontImage,
16703
- setIdCaptureVideoIdBackImage = _z.setIdCaptureVideoIdBackImage,
16704
- setIdCaptureVideoAudioUrl = _z.setIdCaptureVideoAudioUrl;
16705
- var _0 = React.useState('CAPTURING_ID'),
16706
- captureState = _0[0],
16707
- 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];
16708
16717
  React.useEffect(function () {
16709
16718
  if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
16710
16719
  }, [captureState, skipIdCapture]);
@@ -16735,9 +16744,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
16735
16744
  var onVideoCaptureFaceNotDetected = React.useCallback(function () {
16736
16745
  setCaptureState('CHECKING_LIVENESS');
16737
16746
  }, []);
16738
- var _1 = React.useState(0),
16739
- attempt = _1[0],
16740
- setAttempt = _1[1];
16747
+ var _3 = React.useState(0),
16748
+ attempt = _3[0],
16749
+ setAttempt = _3[1];
16741
16750
  var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
16742
16751
  var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
16743
16752
  userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
@@ -16836,6 +16845,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
16836
16845
  goodIdCardFrontFramesThreshold: goodIdCardFrontFramesThreshold,
16837
16846
  goodIdCardBackFramesThreshold: goodIdCardBackFramesThreshold,
16838
16847
  skipShowIdCardBack: skipShowIdCardBack,
16848
+ disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
16849
+ disableFaceDetectionWhileAudioCaptureMsDelay: disableFaceDetectionWhileAudioCaptureMsDelay,
16839
16850
  readTextPrompt: readTextPrompt,
16840
16851
  readTextTimeoutDurationMs: readTextTimeoutDurationMs,
16841
16852
  assets: assets.idVideoCapture,
@@ -19123,28 +19134,32 @@ var VideoIdValidation = function VideoIdValidation(_a) {
19123
19134
  idCaptureRotateLoadingOverlayImageWhenPortrait = _s === void 0 ? true : _s,
19124
19135
  _t = _a.faceLivenessLoadingOverlayMode,
19125
19136
  faceLivenessLoadingOverlayMode = _t === void 0 ? 'default' : _t,
19126
- _u = _a.theme,
19127
- theme = _u === void 0 ? 'default' : _u,
19128
- _v = _a.assets,
19129
- assets = _v === void 0 ? {} : _v,
19130
- _w = _a.classNames,
19131
- classNames = _w === void 0 ? {} : _w,
19132
- _x = _a.colors,
19133
- colors = _x === void 0 ? {} : _x,
19134
- _y = _a.verbiage,
19135
- verbiage = _y === void 0 ? {} : _y,
19136
- _z = _a.captureSignature,
19137
- captureSignature = _z === void 0 ? false : _z,
19138
- _0 = _a.captureSignatureVideo,
19139
- captureSignatureVideo = _0 === void 0 ? false : _0,
19140
- _1 = _a.captureAdditionalDocuments,
19141
- captureAdditionalDocuments = _1 === void 0 ? [] : _1,
19142
- _2 = _a.geolocationEnabled,
19143
- geolocationEnabled = _2 === void 0 ? true : _2,
19144
- _3 = _a.geolocationRequired,
19145
- geolocationRequired = _3 === void 0 ? false : _3,
19146
- _4 = _a.debugMode,
19147
- 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;
19148
19163
  useLanguage(lang);
19149
19164
  var videoIdCaptureProps = React.useMemo(function () {
19150
19165
  return {
@@ -19170,13 +19185,15 @@ var VideoIdValidation = function VideoIdValidation(_a) {
19170
19185
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
19171
19186
  idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
19172
19187
  faceLivenessLoadingOverlayMode: faceLivenessLoadingOverlayMode,
19188
+ disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
19189
+ disableFaceDetectionWhileAudioCaptureMsDelay: disableFaceDetectionWhileAudioCaptureMsDelay,
19173
19190
  assets: assets,
19174
19191
  classNames: classNames,
19175
19192
  colors: colors,
19176
19193
  verbiage: verbiage,
19177
19194
  debugMode: debugMode
19178
19195
  };
19179
- }, [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]);
19180
19197
  var additionalDocumentCaptureProps = React.useMemo(function () {
19181
19198
  return {
19182
19199
  documents: captureAdditionalDocuments,