@hexar/biometric-identity-sdk-react-native 1.20.0 → 1.21.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"VideoRecorder.d.ts","sourceRoot":"","sources":["../../src/components/VideoRecorder.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAexE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAmC,MAAM,oCAAoC,CAAC;AAE1I,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,UAAU,EAAE,CAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACtD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBA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tD;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2CD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAigCtD,CAAC;AA4PF,eAAe,aAAa,CAAC"}
@@ -362,7 +362,12 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
362
362
  };
363
363
  biometric_identity_sdk_core_1.logger.info('Video recording completed:', result.frames.length, 'frames,', (actualDuration / 1000).toFixed(1) + 's', 'challenges:', currentCompletedChallenges.length);
364
364
  isRecordingRef.current = false;
365
- onComplete(result);
365
+ // Delay onComplete so Vision Camera's native session (especially
366
+ // multi-physical-camera sessions opened via physicalDevices) has time
367
+ // to fully close before the parent unmounts the <Camera> view.
368
+ // Without this delay, CameraViewModule.findCameraView throws
369
+ // IllegalViewOperationException on Android 13 (SDK 33).
370
+ setTimeout(() => onComplete(result), 250);
366
371
  }
367
372
  catch (error) {
368
373
  biometric_identity_sdk_core_1.logger.error('Error processing video:', error);
@@ -512,7 +517,8 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
512
517
  challengesCompleted: currentCompletedChallenges,
513
518
  sessionId,
514
519
  };
515
- onComplete(result);
520
+ setPhase('processing');
521
+ setTimeout(() => onComplete(result), 250);
516
522
  }
517
523
  else {
518
524
  biometric_identity_sdk_core_1.logger.info('Stopping recording with frames (fallback):', currentFrames.length);
@@ -524,7 +530,8 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
524
530
  challengesCompleted: currentCompletedChallenges,
525
531
  sessionId,
526
532
  };
527
- onComplete(result);
533
+ setPhase('processing');
534
+ setTimeout(() => onComplete(result), 250);
528
535
  }
529
536
  }
530
537
  }
@@ -557,7 +564,7 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
557
564
  };
558
565
  setTimeout(() => {
559
566
  onComplete(result);
560
- }, 100);
567
+ }, 250);
561
568
  }
562
569
  }, [frames, completedChallenges, challenges, sessionId, onComplete, minDurationMs, resetAndRetry, strings]);
563
570
  const runChallenge = (0, react_1.useCallback)((index) => {
@@ -600,7 +607,8 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
600
607
  challengesCompleted: currentCompletedChallenges,
601
608
  sessionId,
602
609
  };
603
- onComplete(result);
610
+ setPhase('processing');
611
+ setTimeout(() => onComplete(result), 250);
604
612
  }
605
613
  }
606
614
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexar/biometric-identity-sdk-react-native",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "React Native wrapper for Biometric Identity SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -432,7 +432,12 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
432
432
  logger.info('Video recording completed:', result.frames.length, 'frames,', (actualDuration / 1000).toFixed(1) + 's', 'challenges:', currentCompletedChallenges.length);
433
433
 
434
434
  isRecordingRef.current = false;
435
- onComplete(result);
435
+ // Delay onComplete so Vision Camera's native session (especially
436
+ // multi-physical-camera sessions opened via physicalDevices) has time
437
+ // to fully close before the parent unmounts the <Camera> view.
438
+ // Without this delay, CameraViewModule.findCameraView throws
439
+ // IllegalViewOperationException on Android 13 (SDK 33).
440
+ setTimeout(() => onComplete(result), 250);
436
441
  } catch (error) {
437
442
  logger.error('Error processing video:', error);
438
443
  setPhase('recording');
@@ -598,7 +603,8 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
598
603
  challengesCompleted: currentCompletedChallenges,
599
604
  sessionId,
600
605
  };
601
- onComplete(result);
606
+ setPhase('processing');
607
+ setTimeout(() => onComplete(result), 250);
602
608
  } else {
603
609
  logger.info('Stopping recording with frames (fallback):', currentFrames.length);
604
610
  const result: VideoRecordingResult = {
@@ -609,7 +615,8 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
609
615
  challengesCompleted: currentCompletedChallenges,
610
616
  sessionId,
611
617
  };
612
- onComplete(result);
618
+ setPhase('processing');
619
+ setTimeout(() => onComplete(result), 250);
613
620
  }
614
621
  }
615
622
  } else {
@@ -649,7 +656,7 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
649
656
 
650
657
  setTimeout(() => {
651
658
  onComplete(result);
652
- }, 100);
659
+ }, 250);
653
660
  }
654
661
  }, [frames, completedChallenges, challenges, sessionId, onComplete, minDurationMs, resetAndRetry, strings]);
655
662
 
@@ -697,7 +704,8 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
697
704
  challengesCompleted: currentCompletedChallenges,
698
705
  sessionId,
699
706
  };
700
- onComplete(result);
707
+ setPhase('processing');
708
+ setTimeout(() => onComplete(result), 250);
701
709
  }
702
710
  }
703
711
  return;