@velion-la/onboarding-sdk-react-native 1.2.0-beta.1 → 1.2.0-beta.4

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.
Files changed (42) hide show
  1. package/README.md +15 -13
  2. package/lib/commonjs/camera/DocumentCapture.js +53 -33
  3. package/lib/commonjs/camera/DocumentCapture.js.map +1 -1
  4. package/lib/commonjs/camera/LivenessCamera.js +120 -83
  5. package/lib/commonjs/camera/LivenessCamera.js.map +1 -1
  6. package/lib/commonjs/camera/MapAddressPicker.js +1 -1
  7. package/lib/commonjs/camera/MapAddressPicker.js.map +1 -1
  8. package/lib/commonjs/steps/DocumentsOcrStep.js +2 -2
  9. package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -1
  10. package/lib/commonjs/steps/LivenessMatchStep.js +7 -4
  11. package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -1
  12. package/lib/commonjs/ui/overlays/LoadingOverlay.js +1 -1
  13. package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -1
  14. package/lib/commonjs/ui/overlays/RetryDialog.js +1 -1
  15. package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -1
  16. package/lib/module/camera/DocumentCapture.js +54 -34
  17. package/lib/module/camera/DocumentCapture.js.map +1 -1
  18. package/lib/module/camera/LivenessCamera.js +121 -84
  19. package/lib/module/camera/LivenessCamera.js.map +1 -1
  20. package/lib/module/camera/MapAddressPicker.js +1 -1
  21. package/lib/module/camera/MapAddressPicker.js.map +1 -1
  22. package/lib/module/steps/DocumentsOcrStep.js +2 -2
  23. package/lib/module/steps/DocumentsOcrStep.js.map +1 -1
  24. package/lib/module/steps/LivenessMatchStep.js +7 -4
  25. package/lib/module/steps/LivenessMatchStep.js.map +1 -1
  26. package/lib/module/ui/overlays/LoadingOverlay.js +1 -1
  27. package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -1
  28. package/lib/module/ui/overlays/RetryDialog.js +1 -1
  29. package/lib/module/ui/overlays/RetryDialog.js.map +1 -1
  30. package/lib/typescript/camera/DocumentCapture.d.ts +9 -3
  31. package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -1
  32. package/lib/typescript/camera/LivenessCamera.d.ts +27 -9
  33. package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -1
  34. package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -1
  35. package/package.json +16 -14
  36. package/src/camera/DocumentCapture.tsx +56 -39
  37. package/src/camera/LivenessCamera.tsx +140 -83
  38. package/src/camera/MapAddressPicker.tsx +1 -1
  39. package/src/steps/DocumentsOcrStep.tsx +2 -2
  40. package/src/steps/LivenessMatchStep.tsx +12 -6
  41. package/src/ui/overlays/LoadingOverlay.tsx +1 -1
  42. package/src/ui/overlays/RetryDialog.tsx +1 -1
package/README.md CHANGED
@@ -82,6 +82,8 @@ npm install @velion-la/onboarding-sdk-react-native
82
82
  ```bash
83
83
  npm install \
84
84
  react-native-vision-camera \
85
+ react-native-nitro-modules \
86
+ react-native-nitro-image \
85
87
  react-native-svg \
86
88
  react-native-sse \
87
89
  expo-application expo-crypto expo-device expo-image-manipulator expo-keep-awake expo-location \
@@ -142,11 +144,13 @@ That is why they are optional: an existing integration keeps working untouched.
142
144
 
143
145
  | Package | Minimum | Tested against |
144
146
  |---|---|---|
145
- | `react` | `>=19.0.0` | `19.1.0` |
146
- | `react-native` | `>=0.81.0` | `0.81.5` |
147
- | `expo` | `>=54.0.0` | `~54.0.34` |
148
- | `react-native-vision-camera` | `>=4.6.0` | `4.7.x` |
149
- | `react-native-keyboard-controller` (optional) | `>=1.18.0` | `1.18.5` |
147
+ | `react` | `>=19.2.0` | `19.2.3` |
148
+ | `react-native` | `>=0.86.0` | `0.86.3` |
149
+ | `expo` | `>=57.0.0` | `~57.0.20` |
150
+ | `react-native-vision-camera` | `>=5.0.0` | `5.2.3` |
151
+ | `react-native-nitro-modules` | `>=0.37.0` | `0.37.1` |
152
+ | `react-native-nitro-image` | `>=0.15.0` | `0.15.2` |
153
+ | `react-native-keyboard-controller` (optional) | `>=1.18.0` | `1.21.9` |
150
154
 
151
155
  ---
152
156
 
@@ -158,19 +162,17 @@ and `android/` folders generated (either a bare React Native project or
158
162
 
159
163
  ### Expo plugins (`app.json` / `app.config.js`)
160
164
 
165
+ > **`react-native-vision-camera` has no plugin entry.** v5 does not ship an
166
+ > Expo config plugin, so the camera permission strings it used to generate must
167
+ > be declared by hand: `NSCameraUsageDescription` under `ios.infoPlist` and
168
+ > `android.permission.CAMERA` under `android.permissions`. Both are shown in
169
+ > the snippet after this one.
170
+
161
171
  ```jsonc
162
172
  {
163
173
  "expo": {
164
174
  "plugins": [
165
175
  "expo-dev-client",
166
- [
167
- "react-native-vision-camera",
168
- {
169
- "cameraPermissionText": "$(PRODUCT_NAME) needs access to your camera to capture your ID document and run the liveness check.",
170
- "enableMicrophonePermission": false,
171
- "enableCodeScanner": false
172
- }
173
- ],
174
176
  [
175
177
  "expo-location",
176
178
  {
@@ -17,9 +17,15 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
17
17
  /**
18
18
  * @fileoverview Full-screen document camera with an ID-1 frame guide.
19
19
  *
20
- * Uses `react-native-vision-camera` v4 in `photo` mode. Tapping the shutter
21
- * triggers `takePhoto()` with `qualityPrioritization: 'balanced'`; the file
22
- * URI is returned to the caller via `onCaptured`.
20
+ * Uses `react-native-vision-camera` v5. The camera streams into two explicit
21
+ * outputs — a preview and a photo output configured for `quality` — and the
22
+ * shutter calls `capturePhotoToFile()`, which writes the JPEG to a temporary
23
+ * file and hands its path to the caller via `onCaptured`.
24
+ *
25
+ * We deliberately use `capturePhotoToFile()` rather than `capturePhoto()`:
26
+ * the caller only ever needs a path to crop and upload, and the file variant
27
+ * avoids holding a native `Photo` buffer in JS that would have to be
28
+ * `dispose()`d by hand on every branch, including the error paths.
23
29
  *
24
30
  * Visual: dark scrim with a transparent rectangular cutout (ID-1 ratio). The
25
31
  * cutout is both the visible guide AND the crop region: on capture we hand the
@@ -53,6 +59,16 @@ function DocumentCapture({
53
59
  height: screenH
54
60
  } = (0, _reactNative.useWindowDimensions)();
55
61
  const cameraRef = (0, _react.useRef)(null);
62
+ // The preview the user frames the document in, and the still-image output
63
+ // the shutter captures from. In v5 both are explicit: the session only
64
+ // produces what the `outputs` array asks for.
65
+ const previewOutput = (0, _reactNativeVisionCamera.usePreviewOutput)();
66
+ // `quality` over speed — this frame goes to the backend OCR, and a soft or
67
+ // over-compressed capture is the difference between a readable document and
68
+ // a rejected one. The default `UHD_4_3` target resolution is kept.
69
+ const photoOutput = (0, _reactNativeVisionCamera.usePhotoOutput)({
70
+ qualityPrioritization: 'quality'
71
+ });
56
72
  // Cross-platform back-camera selection.
57
73
  //
58
74
  // iOS (especially 15 Pro / Pro Max with multi-lens systems): asking for
@@ -69,7 +85,7 @@ function DocumentCapture({
69
85
  // harm anything. Continuous AF is the default focus mode on both
70
86
  // platforms, so cross-platform behaviour stays consistent.
71
87
  const device = (0, _reactNativeVisionCamera.useCameraDevice)('back', {
72
- physicalDevices: ['ultra-wide-angle-camera', 'wide-angle-camera', 'telephoto-camera']
88
+ physicalDevices: ['ultra-wide-angle', 'wide-angle', 'telephoto']
73
89
  });
74
90
  const {
75
91
  hasPermission,
@@ -98,26 +114,31 @@ function DocumentCapture({
98
114
  return () => clearTimeout(t);
99
115
  }, [device, hasPermission]);
100
116
 
101
- // NOTE: we intentionally do NOT call `cameraRef.current.focus()` on mount
102
- // or before each shutter. iOS's continuous auto-focus runs by default and
103
- // is what makes the native Camera app feel sharp at any distance. Calling
104
- // `focus()` switches the device into single-shot/locked mode and DOES NOT
105
- // restore continuous AF afterwards (vision-camera v4 has no "resume AF"
106
- // API). The previous "autofocus on mount" + "autofocus before shutter"
107
- // calls were the cause of blurry captures on iPhone 15 Pro Max: they
108
- // pinned focus to the centre even after the user moved the phone, and
109
- // never re-engaged continuous AF.
117
+ // NOTE: we intentionally do NOT call `focusTo()` on mount or before each
118
+ // shutter. iOS's continuous auto-focus runs by default and is what makes
119
+ // the native Camera app feel sharp at any distance. Focusing explicitly
120
+ // switches the device into single-shot/locked mode and does not restore
121
+ // continuous AF on its own. The previous "autofocus on mount" + "autofocus
122
+ // before shutter" calls were the cause of blurry captures on iPhone 15 Pro
123
+ // Max: they pinned focus to the centre even after the user moved the phone,
124
+ // and never re-engaged continuous AF.
125
+ //
126
+ // v5 does expose `CameraRef.resetFocus()` to return the device to
127
+ // continuous AF, but we deliberately don't call it after a tap: the tap is
128
+ // the user asking us to hold focus there, and auto-releasing it would fight
129
+ // that intent. Focus re-engages when the component remounts for the next
130
+ // side of the document.
110
131
  //
111
132
  // Tap-to-focus is the one user-initiated override — when the user taps,
112
133
  // they're explicitly asking us to lock focus on that point.
113
- const supportsFocus = Boolean(device?.supportsFocus);
134
+ const supportsFocus = Boolean(device?.supportsFocusMetering);
114
135
  const handleTapToFocus = (0, _react.useCallback)(event => {
115
136
  if (!supportsFocus || !cameraRef.current) return;
116
137
  const {
117
138
  locationX,
118
139
  locationY
119
140
  } = event.nativeEvent;
120
- cameraRef.current.focus({
141
+ cameraRef.current.focusTo({
121
142
  x: locationX,
122
143
  y: locationY
123
144
  }).catch(() => {
@@ -141,10 +162,10 @@ function DocumentCapture({
141
162
  setShooting(true);
142
163
  setError(null);
143
164
  try {
144
- const photo = await cameraRef.current.takePhoto({
145
- flash: 'off',
165
+ const photo = await photoOutput.capturePhotoToFile({
166
+ flashMode: 'off',
146
167
  enableShutterSound: false
147
- });
168
+ }, {});
148
169
  // Await the caller's crop/compress so the processing overlay stays up
149
170
  // for the whole capture→preview gap (a few seconds), giving the user
150
171
  // feedback instead of an idle camera. On success the parent flips phase
@@ -161,7 +182,7 @@ function DocumentCapture({
161
182
  } finally {
162
183
  setShooting(false);
163
184
  }
164
- }, [onCaptured, side, shooting, orientation, screenW, screenH]);
185
+ }, [onCaptured, photoOutput, side, shooting, orientation, screenW, screenH]);
165
186
  if (!hasPermission) {
166
187
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
167
188
  style: [styles.permission, {
@@ -229,26 +250,25 @@ function DocumentCapture({
229
250
  ref: cameraRef,
230
251
  style: _reactNative.StyleSheet.absoluteFill,
231
252
  device: device,
232
- photo: true,
233
- photoQualityBalance: "quality"
234
- // Lock the captured photo to the *preview's* orientation (OSDKR-13).
235
- // vision-camera defaults to `outputOrientation="device"`, which emits
236
- // the photo in whatever orientation the phone is physically held —
237
- // even though this screen is locked to portrait and both the preview
238
- // and the ID-1 guide stay portrait. A user tilting the phone sideways
239
- // to frame a landscape card therefore got a photo rotated 90° from
240
- // what they framed, and the guide→photo crop mapping (which is in
241
- // screen space) landed on the wrong region. With `preview` the photo
242
- // always comes back in the orientation the user saw.
253
+ outputs: [previewOutput, photoOutput]
254
+ // Lock the captured photo to the *interface* orientation (OSDKR-13).
255
+ // The alternative, `'device'`, emits the photo in whatever orientation
256
+ // the phone is physically held — even though this screen is locked to
257
+ // portrait and both the preview and the ID-1 guide stay portrait. A
258
+ // user tilting the phone sideways to frame a landscape card therefore
259
+ // got a photo rotated 90° from what they framed, and the guide→photo
260
+ // crop mapping (which is in screen space) landed on the wrong region.
261
+ // With `'interface'` the photo always comes back in the orientation
262
+ // the user saw. (This is v5's spelling of what v4 called
263
+ // `outputOrientation="preview"`.)
243
264
  ,
244
- outputOrientation: "preview"
265
+ orientationSource: "interface"
245
266
  // Explicit `cover`: the guide-crop math in `computeGuideCropRect`
246
267
  // assumes the preview center-crops the sensor frame to the screen
247
268
  // aspect ratio. `cover` is vision-camera's default, but we pin it so
248
269
  // the crop never silently drifts if that default changes.
249
270
  ,
250
271
  resizeMode: "cover",
251
- enableZoomGesture: false,
252
272
  isActive: true
253
273
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
254
274
  style: _reactNative.StyleSheet.absoluteFill,
@@ -549,7 +569,7 @@ const styles = _reactNative.StyleSheet.create({
549
569
  backgroundColor: 'transparent'
550
570
  },
551
571
  processingOverlay: {
552
- ..._reactNative.StyleSheet.absoluteFillObject,
572
+ ..._reactNative.StyleSheet.absoluteFill,
553
573
  alignItems: 'center',
554
574
  justifyContent: 'center',
555
575
  gap: 14,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeSvg","_interopRequireWildcard","_reactNativeVisionCamera","_theme","_Button","_useSafeAreaInsets","_documentCrop","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DocumentCapture","side","orientation","instructions","captureLabel","permissionDeniedLabel","retryLabel","cancelLabel","processingLabel","onCaptured","onCancel","theme","useTheme","insets","useSafeAreaInsets","width","screenW","height","screenH","useWindowDimensions","cameraRef","useRef","device","useCameraDevice","physicalDevices","hasPermission","requestPermission","useCameraPermission","requestedOnce","setRequestedOnce","useState","shooting","setShooting","error","setError","deviceTimeout","setDeviceTimeout","focusPoint","setFocusPoint","useEffect","setTimeout","clearTimeout","supportsFocus","Boolean","handleTapToFocus","useCallback","event","current","locationX","locationY","nativeEvent","focus","x","y","catch","key","Date","now","handleShutter","photo","takePhoto","flash","enableShutterSound","cutout","computeCutout","err","Error","message","String","jsxs","View","style","styles","permission","backgroundColor","children","jsx","Text","permissionText","color","textColor","row","Button","variant","label","onPress","fullWidth","actionBtn","ActivityIndicator","primaryColor","root","Camera","ref","StyleSheet","absoluteFill","photoQualityBalance","outputOrientation","resizeMode","enableZoomGesture","isActive","Pressable","accessibilityLabel","DocumentMaskOverlay","pointerEvents","focusRing","left","FOCUS_RING_SIZE","top","topBar","iconBtn","iconBtnText","instructionsText","bottomBar","bottom","errorText","accessibilityRole","accessibilityState","disabled","shutter","borderColor","withAlpha","shutterDisabled","shutterCore","processingOverlay","size","processingText","CORNER_LENGTH","CORNER_THICKNESS","CUTOUT_RADIUS","DIM_COLOR","cutoutW","cutoutH","R","Defs","Mask","id","Rect","fill","rx","ry","mask","position","corner","cornerTL","borderTopLeftRadius","cornerTR","borderTopRightRadius","cornerBL","borderBottomLeftRadius","cornerBR","borderBottomRightRadius","create","flex","alignItems","justifyContent","padding","gap","textAlign","fontSize","lineHeight","flexDirection","maxWidth","right","borderRadius","fontWeight","paddingHorizontal","paddingVertical","overflow","borderWidth","opacity","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","absoluteFillObject"],"sourceRoot":"../../../src","sources":["camera/DocumentCapture.tsx"],"mappings":";;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,eAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAOA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AAAuE,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAG,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAA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Ac,EAAE3C,gBAAgB;IAChC6C,gBAAgB,EAAE7C;EACpB,CAAC;EACDoB,QAAQ,EAAE;IACRlC,MAAM,EAAE,CAAC;IACTR,IAAI,EAAE,CAAC;IACPoE,iBAAiB,EAAE9C,gBAAgB;IACnC4C,eAAe,EAAE5C;EACnB,CAAC;EACDsB,QAAQ,EAAE;IACRpC,MAAM,EAAE,CAAC;IACTiD,KAAK,EAAE,CAAC;IACRW,iBAAiB,EAAE9C,gBAAgB;IACnC6C,gBAAgB,EAAE7C;EACpB,CAAC;EACDvB,SAAS,EAAE;IACTqC,QAAQ,EAAE,UAAU;IACpB9H,KAAK,EAAE2F,eAAe;IACtBzF,MAAM,EAAEyF,eAAe;IACvByD,YAAY,EAAEzD,eAAe,GAAG,CAAC;IACjC8D,WAAW,EAAE,CAAC;IACdjD,WAAW,EAAE,SAAS;IACtB7C,eAAe,EAAE;EACnB,CAAC;EACDiD,iBAAiB,EAAE;IACjB,GAAG9B,uBAAU,CAACiF,kBAAkB;IAChCrB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBE,GAAG,EAAE,EAAE;IACPlF,eAAe,EAAE;EACnB,CAAC;EACDmD,cAAc,EAAE;IACd9C,KAAK,EAAE,SAAS;IAChB+E,QAAQ,EAAE,EAAE;IACZM,UAAU,EAAE,KAAK;IACjBP,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeSvg","_interopRequireWildcard","_reactNativeVisionCamera","_theme","_Button","_useSafeAreaInsets","_documentCrop","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DocumentCapture","side","orientation","instructions","captureLabel","permissionDeniedLabel","retryLabel","cancelLabel","processingLabel","onCaptured","onCancel","theme","useTheme","insets","useSafeAreaInsets","width","screenW","height","screenH","useWindowDimensions","cameraRef","useRef","previewOutput","usePreviewOutput","photoOutput","usePhotoOutput","qualityPrioritization","device","useCameraDevice","physicalDevices","hasPermission","requestPermission","useCameraPermission","requestedOnce","setRequestedOnce","useState","shooting","setShooting","error","setError","deviceTimeout","setDeviceTimeout","focusPoint","setFocusPoint","useEffect","setTimeout","clearTimeout","supportsFocus","Boolean","supportsFocusMetering","handleTapToFocus","useCallback","event","current","locationX","locationY","nativeEvent","focusTo","x","y","catch","key","Date","now","handleShutter","photo","capturePhotoToFile","flashMode","enableShutterSound","cutout","computeCutout","err","Error","message","String","jsxs","View","style","styles","permission","backgroundColor","children","jsx","Text","permissionText","color","textColor","row","Button","variant","label","onPress","fullWidth","actionBtn","ActivityIndicator","primaryColor","root","Camera","ref","StyleSheet","absoluteFill","outputs","orientationSource","resizeMode","isActive","Pressable","accessibilityLabel","DocumentMaskOverlay","pointerEvents","focusRing","left","FOCUS_RING_SIZE","top","topBar","iconBtn","iconBtnText","instructionsText","bottomBar","bottom","errorText","accessibilityRole","accessibilityState","disabled","shutter","borderColor","withAlpha","shutterDisabled","shutterCore","processingOverlay","size","processingText","CORNER_LENGTH","CORNER_THICKNESS","CUTOUT_RADIUS","DIM_COLOR","cutoutW","cutoutH","R","Defs","Mask","id","Rect","fill","rx","ry","mask","position","corner","cornerTL","borderTopLeftRadius","cornerTR","borderTopRightRadius","cornerBL","borderBottomLeftRadius","cornerBR","borderBottomRightRadius","create","flex","alignItems","justifyContent","padding","gap","textAlign","fontSize","lineHeight","flexDirection","maxWidth","right","borderRadius","fontWeight","paddingHorizontal","paddingVertical","overflow","borderWidth","opacity","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth"],"sourceRoot":"../../../src","sources":["camera/DocumentCapture.tsx"],"mappings":";;;;;;AAqBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,eAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAUA,IAAAK,MAA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EAAE;IACRpC,MAAM,EAAE,CAAC;IACTiD,KAAK,EAAE,CAAC;IACRW,iBAAiB,EAAE9C,gBAAgB;IACnC6C,gBAAgB,EAAE7C;EACpB,CAAC;EACDvB,SAAS,EAAE;IACTqC,QAAQ,EAAE,UAAU;IACpBnI,KAAK,EAAEgG,eAAe;IACtB9F,MAAM,EAAE8F,eAAe;IACvByD,YAAY,EAAEzD,eAAe,GAAG,CAAC;IACjC8D,WAAW,EAAE,CAAC;IACdjD,WAAW,EAAE,SAAS;IACtB5C,eAAe,EAAE;EACnB,CAAC;EACDgD,iBAAiB,EAAE;IACjB,GAAG7B,uBAAU,CAACC,YAAY;IAC1B0D,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBE,GAAG,EAAE,EAAE;IACPjF,eAAe,EAAE;EACnB,CAAC;EACDkD,cAAc,EAAE;IACd7C,KAAK,EAAE,SAAS;IAChB8E,QAAQ,EAAE,EAAE;IACZM,UAAU,EAAE,KAAK;IACjBP,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -17,18 +17,31 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
17
17
  * @fileoverview Liveness camera surface — front-facing vision-camera with an
18
18
  * oval mask, status pill, and capture loop driven by the parent step.
19
19
  *
20
- * Capture strategy: vision-camera v4 frame processors run on a worklet thread
21
- * and don't expose the JPEG bytes back to JS without a custom native plugin.
22
- * We avoid that complication by using `takePhoto({ qualityPrioritization:
23
- * 'speed' })` on a JS-level interval (matches the `setInterval` pattern in
24
- * `web/LivenessModule.ts`). Real-world FPS lands around 3–8 fps which is
25
- * sufficient for Iris's challenge cadence.
20
+ * Capture strategy: frame processors run on a worklet thread and don't expose
21
+ * the JPEG bytes back to JS without a custom native plugin. We avoid that
22
+ * complication by capturing stills to a file on a JS-level interval (matches
23
+ * the `setInterval` pattern in `web/LivenessModule.ts`). Real-world FPS lands
24
+ * around 3–8 fps which is sufficient for Iris's challenge cadence.
25
+ *
26
+ * The camera streams into three outputs at once — preview, photo and video —
27
+ * so the frames sent to Iris and the mp4 kept as evidence come off the same
28
+ * session without either interrupting the other.
26
29
  *
27
30
  * The parent owns the loop and the WebSocket — this component just exposes a
28
31
  * `captureFrame` ref so the step can drive the timing while the camera stays
29
32
  * mounted across challenges.
30
33
  */
31
34
 
35
+ /**
36
+ * The recorded liveness video, as this component reports it upwards.
37
+ *
38
+ * vision-camera v5 hands `onRecordingFinished` a bare file path, while the
39
+ * upload pipeline also wants the duration for the `liveness-verify` metadata.
40
+ * We read the duration off the `Recorder` before finalising and re-assemble
41
+ * both here, so the step keeps consuming one object instead of two loose
42
+ * values.
43
+ */
44
+
32
45
  /**
33
46
  * Visual cue applied to the oval guide. The parent maps the current Iris
34
47
  * challenge to one of these so the oval animates in a way that reinforces
@@ -41,21 +54,29 @@ const LivenessCamera = exports.LivenessCamera = /*#__PURE__*/(0, _react.forwardR
41
54
  const insets = (0, _useSafeAreaInsets.useSafeAreaInsets)();
42
55
  const cameraRef = (0, _react.useRef)(null);
43
56
  const device = (0, _reactNativeVisionCamera.useCameraDevice)('front');
44
- // Pick a 720p / 30-fps format so the recorded mp4 stays a few MB instead
45
- // of the device-default 1080p–4K bitrate (a 30 s session can otherwise
46
- // produce a 50–80 MB file that times out on mobile uplinks). The face
47
- // visibility for liveness evidence is fine at 720p. Constraints are
48
- // ordered by priority — vision-camera picks the closest match.
49
- const format = (0, _reactNativeVisionCamera.useCameraFormat)(device, [{
50
- videoResolution: {
51
- width: 1280,
52
- height: 720
53
- }
54
- }, {
55
- fps: 30
56
- }, {
57
- videoStabilizationMode: 'off'
58
- }]);
57
+ const previewOutput = (0, _reactNativeVisionCamera.usePreviewOutput)();
58
+ // Frames for Iris: `speed` over quality on purpose. These are downscaled
59
+ // and re-compressed by `ImageManipulator` before they ever reach the wire,
60
+ // so a slow high-fidelity capture would only cost us frame cadence.
61
+ const photoOutput = (0, _reactNativeVisionCamera.usePhotoOutput)({
62
+ qualityPrioritization: 'speed'
63
+ });
64
+ // Pin the recording to 720p so the mp4 stays a few MB instead of the
65
+ // device-default 1080p–4K bitrate (a 30 s session can otherwise produce a
66
+ // 50–80 MB file that times out on mobile uplinks). Face visibility for
67
+ // liveness evidence is fine at 720p. Audio off — the backend never uses it
68
+ // and recording it would demand the microphone permission.
69
+ const videoOutput = (0, _reactNativeVisionCamera.useVideoOutput)({
70
+ targetResolution: _reactNativeVisionCamera.CommonResolutions.HD_16_9,
71
+ // ~2 Mbps. NOTE the unit: v5 takes bits per second, where v4's
72
+ // `videoBitRate` prop took megabits — passing `2` here would ask for
73
+ // 2 bps and produce an unusable file. The device default (~8 Mbps at
74
+ // 720p) yields a 38 MB file for a 30 s session; ~2 Mbps is plenty for
75
+ // face visibility as compliance evidence and lands around 7–8 MB.
76
+ targetBitRate: 2_000_000,
77
+ enableAudio: false,
78
+ fileType: 'mp4'
79
+ });
59
80
  const {
60
81
  hasPermission,
61
82
  requestPermission
@@ -79,16 +100,24 @@ const LivenessCamera = exports.LivenessCamera = /*#__PURE__*/(0, _react.forwardR
79
100
  const t = setTimeout(() => setDeviceTimeout(true), 4000);
80
101
  return () => clearTimeout(t);
81
102
  }, [device, hasPermission]);
103
+
104
+ // NOTE: `capturePhotoToFile`, not `capturePhoto`. The in-memory variant
105
+ // would hand us a native `Photo` that must be `dispose()`d by hand — in a
106
+ // loop running at up to ~7 fps for a whole session, a single missed
107
+ // dispose on an error path leaks native buffers. It would only pay off if
108
+ // we could sign the bytes directly, and we cannot: the frame still has to
109
+ // go through `ImageManipulator` for the downscale and the horizontal flip,
110
+ // and that API takes a URI, not a buffer. So the file is needed either
111
+ // way, and capturing straight to one keeps the hot loop free of manual
112
+ // memory management.
82
113
  const takeFrame = (0, _react.useCallback)(async () => {
83
114
  if (inFlightRef.current) return null;
84
- const camera = cameraRef.current;
85
- if (!camera) return null;
86
115
  inFlightRef.current = true;
87
116
  try {
88
- return await camera.takePhoto({
89
- flash: 'off',
117
+ return await photoOutput.capturePhotoToFile({
118
+ flashMode: 'off',
90
119
  enableShutterSound: false
91
- });
120
+ }, {});
92
121
  } catch {
93
122
  // Frame failures are non-fatal — the parent loop just retries on the
94
123
  // next tick. Keep the camera mounted.
@@ -96,39 +125,56 @@ const LivenessCamera = exports.LivenessCamera = /*#__PURE__*/(0, _react.forwardR
96
125
  } finally {
97
126
  inFlightRef.current = false;
98
127
  }
99
- }, []);
128
+ }, [photoOutput]);
100
129
 
101
- // Recording is best-effort and orthogonal to the frame loop. We track an
102
- // `isRecording` flag so `stopVideoRecording` is idempotent even if the
103
- // parent calls it twice (e.g. on SESSION_COMPLETE and again on unmount).
104
- const recordingRef = (0, _react.useRef)(false);
105
- const startVideoRecording = (0, _react.useCallback)(opts => {
106
- const camera = cameraRef.current;
107
- if (!camera) {
108
- throw new Error('Camera is not mounted; cannot start recording.');
130
+ // Recording is best-effort and orthogonal to the frame loop. We keep the
131
+ // live `Recorder` in a ref so `stopVideoRecording` is idempotent even if
132
+ // the parent calls it twice (e.g. on SESSION_COMPLETE and again on
133
+ // unmount). In v5 a Recorder is single-use: one is created per recording
134
+ // and discarded once it finishes.
135
+ const recorderRef = (0, _react.useRef)(null);
136
+ // Duration read off the Recorder just before finalising. v5's
137
+ // `onRecordingFinished` only carries the file path, but the upload
138
+ // pipeline reports the duration in the `liveness-verify` metadata.
139
+ const recordedDurationRef = (0, _react.useRef)(undefined);
140
+ const startVideoRecording = (0, _react.useCallback)(async opts => {
141
+ if (recorderRef.current) return;
142
+ const recorder = await videoOutput.createRecorder({});
143
+ recorderRef.current = recorder;
144
+ recordedDurationRef.current = undefined;
145
+ try {
146
+ await recorder.startRecording(filePath => {
147
+ const duration = recordedDurationRef.current ?? (typeof recorder.recordedDuration === 'number' ? recorder.recordedDuration : undefined);
148
+ recorderRef.current = null;
149
+ opts.onRecordingFinished({
150
+ path: filePath,
151
+ duration
152
+ });
153
+ }, error => {
154
+ recorderRef.current = null;
155
+ opts.onRecordingError(error);
156
+ });
157
+ } catch (err) {
158
+ // Startup failed, so neither callback will ever fire — release the
159
+ // ref here or every later start would short-circuit on it.
160
+ recorderRef.current = null;
161
+ throw err;
109
162
  }
110
- if (recordingRef.current) return;
111
- recordingRef.current = true;
112
- camera.startRecording({
113
- fileType: 'mp4',
114
- videoCodec: 'h264',
115
- flash: 'off',
116
- onRecordingFinished: video => {
117
- recordingRef.current = false;
118
- opts.onRecordingFinished(video);
119
- },
120
- onRecordingError: err => {
121
- recordingRef.current = false;
122
- opts.onRecordingError(err);
123
- }
124
- });
125
- }, []);
163
+ }, [videoOutput]);
126
164
  const stopVideoRecording = (0, _react.useCallback)(async () => {
127
- const camera = cameraRef.current;
128
- if (!camera || !recordingRef.current) return;
129
- await camera.stopRecording();
130
- // recordingRef is cleared inside onRecordingFinished/onRecordingError to
131
- // avoid a window where a follow-up start() races with the unfinished stop.
165
+ const recorder = recorderRef.current;
166
+ if (!recorder) return;
167
+ // Read the duration BEFORE stopping: once the recording is finalised the
168
+ // counter is no longer meaningful, and `onRecordingFinished` does not
169
+ // carry it.
170
+ try {
171
+ recordedDurationRef.current = typeof recorder.recordedDuration === 'number' ? recorder.recordedDuration : undefined;
172
+ } catch {
173
+ recordedDurationRef.current = undefined;
174
+ }
175
+ await recorder.stopRecording();
176
+ // recorderRef is cleared inside onRecordingFinished/onRecordingError to
177
+ // avoid a window where a follow-up start races with the unfinished stop.
132
178
  }, []);
133
179
  (0, _react.useImperativeHandle)(ref, () => ({
134
180
  takeFrame,
@@ -202,36 +248,27 @@ const LivenessCamera = exports.LivenessCamera = /*#__PURE__*/(0, _react.forwardR
202
248
  ref: cameraRef,
203
249
  style: _reactNative.StyleSheet.absoluteFill,
204
250
  device: device
205
- // `format` and `fps` cap the sensor output to 720p / 30 fps so the
206
- // recorded mp4 lands in the few-MB range instead of the device
207
- // default (which on modern iPhones is 1080p–4K @ 60 fps).
251
+ // Preview, frames for Iris, and the mp4 recording all stream off the
252
+ // same session. This is the capability the whole liveness step rests
253
+ // on: the JPEG frames and the evidence video are produced at once,
254
+ // from one camera, without interrupting either.
208
255
  ,
209
- ...(format ? {
210
- format
211
- } : {}),
212
- fps: 30
213
- // Cap the encoder to ~2 Mbps. The default `'normal'` setting maps
214
- // to ~8 Mbps for 720p, producing a 38 MB file for a 30 s session;
215
- // ~2 Mbps is plenty for face visibility (compliance evidence) and
216
- // keeps a 30 s recording around 7-8 MB.
256
+ outputs: [previewOutput, photoOutput, videoOutput]
257
+ // Cap the sensor at 30 fps. Resolution and bit-rate are set on the
258
+ // video output itself (see `useVideoOutput` above).
217
259
  ,
218
- videoBitRate: 2
219
- // Lock the recorded video orientation to the preview view's so it
220
- // is never upside-down or sideways on the back-office player.
221
- ,
222
- outputOrientation: "preview",
223
- photo: true
224
- // Enable mp4/h264 recording in parallel with takePhoto(). vision-camera
225
- // v4 supports both surfaces on the same <Camera>; the recording runs
226
- // best-effort and does not affect the frame cadence sent to Iris.
260
+ constraints: [{
261
+ fps: 30
262
+ }]
263
+ // Lock the recorded video orientation to the interface's so it is
264
+ // never upside-down or sideways on the back-office player. (v5's
265
+ // spelling of what v4 called `outputOrientation="preview"`.)
227
266
  ,
228
- video: true,
229
- audio: false,
230
- photoQualityBalance: "speed"
231
- // Keep the vision-camera default (`isMirrored=true` for front cam):
232
- // overriding it to `false` causes a v4 iOS bug where the tkhd matrix
233
- // is written rotated −90° instead of +90°, leaving the recorded mp4
234
- // upside-down. The JPEG frames we send to Iris are un-mirrored
267
+ orientationSource: "interface"
268
+ // We keep the front camera's default mirroring rather than forcing
269
+ // `isMirrored=false`: in v4 that override triggered an iOS bug where
270
+ // the tkhd matrix was written rotated −90° instead of +90°, leaving
271
+ // the mp4 upside-down. The frames we send to Iris are un-mirrored
235
272
  // separately in `captureAndSend` via a horizontal flip with
236
273
  // expo-image-manipulator, so TURN_LEFT/RIGHT still maps to the
237
274
  // real-world yaw.