@velion-la/onboarding-sdk-react-native 1.2.0-beta.1 → 1.2.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -13
- package/lib/commonjs/camera/DocumentCapture.js +53 -33
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -1
- package/lib/commonjs/camera/LivenessCamera.js +120 -83
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -1
- package/lib/commonjs/camera/MapAddressPicker.js +1 -1
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -1
- package/lib/commonjs/steps/DocumentsOcrStep.js +2 -2
- package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -1
- package/lib/commonjs/steps/LivenessMatchStep.js +7 -4
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -1
- package/lib/commonjs/ui/overlays/LoadingOverlay.js +1 -1
- package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -1
- package/lib/commonjs/ui/overlays/RetryDialog.js +1 -1
- package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -1
- package/lib/module/camera/DocumentCapture.js +54 -34
- package/lib/module/camera/DocumentCapture.js.map +1 -1
- package/lib/module/camera/LivenessCamera.js +121 -84
- package/lib/module/camera/LivenessCamera.js.map +1 -1
- package/lib/module/camera/MapAddressPicker.js +1 -1
- package/lib/module/camera/MapAddressPicker.js.map +1 -1
- package/lib/module/steps/DocumentsOcrStep.js +2 -2
- package/lib/module/steps/DocumentsOcrStep.js.map +1 -1
- package/lib/module/steps/LivenessMatchStep.js +7 -4
- package/lib/module/steps/LivenessMatchStep.js.map +1 -1
- package/lib/module/ui/overlays/LoadingOverlay.js +1 -1
- package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -1
- package/lib/module/ui/overlays/RetryDialog.js +1 -1
- package/lib/module/ui/overlays/RetryDialog.js.map +1 -1
- package/lib/typescript/camera/DocumentCapture.d.ts +9 -3
- package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -1
- package/lib/typescript/camera/LivenessCamera.d.ts +27 -9
- package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -1
- package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -1
- package/package.json +16 -14
- package/src/camera/DocumentCapture.tsx +56 -39
- package/src/camera/LivenessCamera.tsx +140 -83
- package/src/camera/MapAddressPicker.tsx +1 -1
- package/src/steps/DocumentsOcrStep.tsx +2 -2
- package/src/steps/LivenessMatchStep.tsx +12 -6
- package/src/ui/overlays/LoadingOverlay.tsx +1 -1
- package/src/ui/overlays/RetryDialog.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_Button","_theme","_jsxRuntime","RetryDialog","title","message","retryLabel","cancelLabel","onRetry","onCancel","theme","useTheme","jsx","View","accessibilityViewIsModal","accessibilityRole","accessibilityLiveRegion","style","styles","root","backgroundColor","children","jsxs","card","iconWrap","mixHex","warningColor","borderColor","withAlpha","Text","iconText","color","textColor","body","textSecondaryColor","numberOfLines","actions","Button","variant","label","onPress","fullWidth","btn","StyleSheet","create","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_Button","_theme","_jsxRuntime","RetryDialog","title","message","retryLabel","cancelLabel","onRetry","onCancel","theme","useTheme","jsx","View","accessibilityViewIsModal","accessibilityRole","accessibilityLiveRegion","style","styles","root","backgroundColor","children","jsxs","card","iconWrap","mixHex","warningColor","borderColor","withAlpha","Text","iconText","color","textColor","body","textSecondaryColor","numberOfLines","actions","Button","variant","label","onPress","fullWidth","btn","StyleSheet","create","absoluteFill","alignItems","justifyContent","padding","zIndex","width","maxWidth","gap","height","borderRadius","borderWidth","fontSize","fontWeight","lineHeight","textAlign","flexDirection","marginTop","alignSelf","flex"],"sourceRoot":"../../../../src","sources":["ui/overlays/RetryDialog.tsx"],"mappings":";;;;;;AAQA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,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AAU,EAAE,QAAQ;IACpBM,GAAG,EAAE;EACP,CAAC;EACD5B,QAAQ,EAAE;IACR0B,KAAK,EAAE,EAAE;IACTG,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBR,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBQ,WAAW,EAAE;EACf,CAAC;EACDzB,QAAQ,EAAE;IACR0B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd,CAAC;EACDtD,KAAK,EAAE;IACLoD,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBE,SAAS,EAAE;EACb,CAAC;EACD1B,IAAI,EAAE;IACJuB,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDvB,OAAO,EAAE;IACPwB,aAAa,EAAE,KAAK;IACpBR,GAAG,EAAE,EAAE;IACPS,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE;EACb,CAAC;EACDpB,GAAG,EAAE;IACHqB,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Full-screen document camera with an ID-1 frame guide.
|
|
5
5
|
*
|
|
6
|
-
* Uses `react-native-vision-camera`
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Uses `react-native-vision-camera` v5. The camera streams into two explicit
|
|
7
|
+
* outputs — a preview and a photo output configured for `quality` — and the
|
|
8
|
+
* shutter calls `capturePhotoToFile()`, which writes the JPEG to a temporary
|
|
9
|
+
* file and hands its path to the caller via `onCaptured`.
|
|
10
|
+
*
|
|
11
|
+
* We deliberately use `capturePhotoToFile()` rather than `capturePhoto()`:
|
|
12
|
+
* the caller only ever needs a path to crop and upload, and the file variant
|
|
13
|
+
* avoids holding a native `Photo` buffer in JS that would have to be
|
|
14
|
+
* `dispose()`d by hand on every branch, including the error paths.
|
|
9
15
|
*
|
|
10
16
|
* Visual: dark scrim with a transparent rectangular cutout (ID-1 ratio). The
|
|
11
17
|
* cutout is both the visible guide AND the crop region: on capture we hand the
|
|
@@ -18,7 +24,7 @@
|
|
|
18
24
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
19
25
|
import { ActivityIndicator, Pressable, StyleSheet, Text, useWindowDimensions, View } from 'react-native';
|
|
20
26
|
import Svg, { Defs, Mask, Rect } from 'react-native-svg';
|
|
21
|
-
import { Camera, useCameraDevice, useCameraPermission } from 'react-native-vision-camera';
|
|
27
|
+
import { Camera, useCameraDevice, useCameraPermission, usePhotoOutput, usePreviewOutput } from 'react-native-vision-camera';
|
|
22
28
|
import { useTheme, withAlpha } from '../ui/theme';
|
|
23
29
|
import { Button } from '../ui/primitives/Button';
|
|
24
30
|
import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
|
|
@@ -48,6 +54,16 @@ export function DocumentCapture({
|
|
|
48
54
|
height: screenH
|
|
49
55
|
} = useWindowDimensions();
|
|
50
56
|
const cameraRef = useRef(null);
|
|
57
|
+
// The preview the user frames the document in, and the still-image output
|
|
58
|
+
// the shutter captures from. In v5 both are explicit: the session only
|
|
59
|
+
// produces what the `outputs` array asks for.
|
|
60
|
+
const previewOutput = usePreviewOutput();
|
|
61
|
+
// `quality` over speed — this frame goes to the backend OCR, and a soft or
|
|
62
|
+
// over-compressed capture is the difference between a readable document and
|
|
63
|
+
// a rejected one. The default `UHD_4_3` target resolution is kept.
|
|
64
|
+
const photoOutput = usePhotoOutput({
|
|
65
|
+
qualityPrioritization: 'quality'
|
|
66
|
+
});
|
|
51
67
|
// Cross-platform back-camera selection.
|
|
52
68
|
//
|
|
53
69
|
// iOS (especially 15 Pro / Pro Max with multi-lens systems): asking for
|
|
@@ -64,7 +80,7 @@ export function DocumentCapture({
|
|
|
64
80
|
// harm anything. Continuous AF is the default focus mode on both
|
|
65
81
|
// platforms, so cross-platform behaviour stays consistent.
|
|
66
82
|
const device = useCameraDevice('back', {
|
|
67
|
-
physicalDevices: ['ultra-wide-angle
|
|
83
|
+
physicalDevices: ['ultra-wide-angle', 'wide-angle', 'telephoto']
|
|
68
84
|
});
|
|
69
85
|
const {
|
|
70
86
|
hasPermission,
|
|
@@ -93,26 +109,31 @@ export function DocumentCapture({
|
|
|
93
109
|
return () => clearTimeout(t);
|
|
94
110
|
}, [device, hasPermission]);
|
|
95
111
|
|
|
96
|
-
// NOTE: we intentionally do NOT call `
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
112
|
+
// NOTE: we intentionally do NOT call `focusTo()` on mount or before each
|
|
113
|
+
// shutter. iOS's continuous auto-focus runs by default and is what makes
|
|
114
|
+
// the native Camera app feel sharp at any distance. Focusing explicitly
|
|
115
|
+
// switches the device into single-shot/locked mode and does not restore
|
|
116
|
+
// continuous AF on its own. The previous "autofocus on mount" + "autofocus
|
|
117
|
+
// before shutter" calls were the cause of blurry captures on iPhone 15 Pro
|
|
118
|
+
// Max: they pinned focus to the centre even after the user moved the phone,
|
|
119
|
+
// and never re-engaged continuous AF.
|
|
120
|
+
//
|
|
121
|
+
// v5 does expose `CameraRef.resetFocus()` to return the device to
|
|
122
|
+
// continuous AF, but we deliberately don't call it after a tap: the tap is
|
|
123
|
+
// the user asking us to hold focus there, and auto-releasing it would fight
|
|
124
|
+
// that intent. Focus re-engages when the component remounts for the next
|
|
125
|
+
// side of the document.
|
|
105
126
|
//
|
|
106
127
|
// Tap-to-focus is the one user-initiated override — when the user taps,
|
|
107
128
|
// they're explicitly asking us to lock focus on that point.
|
|
108
|
-
const supportsFocus = Boolean(device?.
|
|
129
|
+
const supportsFocus = Boolean(device?.supportsFocusMetering);
|
|
109
130
|
const handleTapToFocus = useCallback(event => {
|
|
110
131
|
if (!supportsFocus || !cameraRef.current) return;
|
|
111
132
|
const {
|
|
112
133
|
locationX,
|
|
113
134
|
locationY
|
|
114
135
|
} = event.nativeEvent;
|
|
115
|
-
cameraRef.current.
|
|
136
|
+
cameraRef.current.focusTo({
|
|
116
137
|
x: locationX,
|
|
117
138
|
y: locationY
|
|
118
139
|
}).catch(() => {
|
|
@@ -136,10 +157,10 @@ export function DocumentCapture({
|
|
|
136
157
|
setShooting(true);
|
|
137
158
|
setError(null);
|
|
138
159
|
try {
|
|
139
|
-
const photo = await
|
|
140
|
-
|
|
160
|
+
const photo = await photoOutput.capturePhotoToFile({
|
|
161
|
+
flashMode: 'off',
|
|
141
162
|
enableShutterSound: false
|
|
142
|
-
});
|
|
163
|
+
}, {});
|
|
143
164
|
// Await the caller's crop/compress so the processing overlay stays up
|
|
144
165
|
// for the whole capture→preview gap (a few seconds), giving the user
|
|
145
166
|
// feedback instead of an idle camera. On success the parent flips phase
|
|
@@ -156,7 +177,7 @@ export function DocumentCapture({
|
|
|
156
177
|
} finally {
|
|
157
178
|
setShooting(false);
|
|
158
179
|
}
|
|
159
|
-
}, [onCaptured, side, shooting, orientation, screenW, screenH]);
|
|
180
|
+
}, [onCaptured, photoOutput, side, shooting, orientation, screenW, screenH]);
|
|
160
181
|
if (!hasPermission) {
|
|
161
182
|
return /*#__PURE__*/_jsxs(View, {
|
|
162
183
|
style: [styles.permission, {
|
|
@@ -224,26 +245,25 @@ export function DocumentCapture({
|
|
|
224
245
|
ref: cameraRef,
|
|
225
246
|
style: StyleSheet.absoluteFill,
|
|
226
247
|
device: device,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
//
|
|
234
|
-
//
|
|
235
|
-
//
|
|
236
|
-
//
|
|
237
|
-
//
|
|
248
|
+
outputs: [previewOutput, photoOutput]
|
|
249
|
+
// Lock the captured photo to the *interface* orientation (OSDKR-13).
|
|
250
|
+
// The alternative, `'device'`, emits the photo in whatever orientation
|
|
251
|
+
// the phone is physically held — even though this screen is locked to
|
|
252
|
+
// portrait and both the preview and the ID-1 guide stay portrait. A
|
|
253
|
+
// user tilting the phone sideways to frame a landscape card therefore
|
|
254
|
+
// got a photo rotated 90° from what they framed, and the guide→photo
|
|
255
|
+
// crop mapping (which is in screen space) landed on the wrong region.
|
|
256
|
+
// With `'interface'` the photo always comes back in the orientation
|
|
257
|
+
// the user saw. (This is v5's spelling of what v4 called
|
|
258
|
+
// `outputOrientation="preview"`.)
|
|
238
259
|
,
|
|
239
|
-
|
|
260
|
+
orientationSource: "interface"
|
|
240
261
|
// Explicit `cover`: the guide-crop math in `computeGuideCropRect`
|
|
241
262
|
// assumes the preview center-crops the sensor frame to the screen
|
|
242
263
|
// aspect ratio. `cover` is vision-camera's default, but we pin it so
|
|
243
264
|
// the crop never silently drifts if that default changes.
|
|
244
265
|
,
|
|
245
266
|
resizeMode: "cover",
|
|
246
|
-
enableZoomGesture: false,
|
|
247
267
|
isActive: true
|
|
248
268
|
}), /*#__PURE__*/_jsx(Pressable, {
|
|
249
269
|
style: StyleSheet.absoluteFill,
|
|
@@ -544,7 +564,7 @@ const styles = StyleSheet.create({
|
|
|
544
564
|
backgroundColor: 'transparent'
|
|
545
565
|
},
|
|
546
566
|
processingOverlay: {
|
|
547
|
-
...StyleSheet.
|
|
567
|
+
...StyleSheet.absoluteFill,
|
|
548
568
|
alignItems: 'center',
|
|
549
569
|
justifyContent: 'center',
|
|
550
570
|
gap: 14,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useRef","useState","ActivityIndicator","Pressable","StyleSheet","Text","useWindowDimensions","View","Svg","Defs","Mask","Rect","Camera","useCameraDevice","useCameraPermission","useTheme","withAlpha","Button","useSafeAreaInsets","computeCutout","jsx","_jsx","jsxs","_jsxs","DocumentCapture","side","orientation","instructions","captureLabel","permissionDeniedLabel","retryLabel","cancelLabel","processingLabel","onCaptured","onCancel","theme","insets","width","screenW","height","screenH","cameraRef","device","physicalDevices","hasPermission","requestPermission","requestedOnce","setRequestedOnce","shooting","setShooting","error","setError","deviceTimeout","setDeviceTimeout","focusPoint","setFocusPoint","t","setTimeout","clearTimeout","supportsFocus","Boolean","handleTapToFocus","event","current","locationX","locationY","nativeEvent","focus","x","y","catch","key","Date","now","handleShutter","photo","takePhoto","flash","enableShutterSound","cutout","err","Error","message","String","style","styles","permission","backgroundColor","children","permissionText","color","textColor","row","variant","label","onPress","fullWidth","actionBtn","primaryColor","root","ref","absoluteFill","photoQualityBalance","outputOrientation","resizeMode","enableZoomGesture","isActive","accessibilityLabel","DocumentMaskOverlay","pointerEvents","focusRing","left","FOCUS_RING_SIZE","top","topBar","iconBtn","iconBtnText","instructionsText","bottomBar","bottom","errorText","accessibilityRole","accessibilityState","disabled","shutter","borderColor","shutterDisabled","shutterCore","processingOverlay","size","processingText","CORNER_LENGTH","CORNER_THICKNESS","CUTOUT_RADIUS","DIM_COLOR","cutoutW","cutoutH","R","id","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":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAChE,SACEC,iBAAiB,EACjBC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,mBAAmB,EACnBC,IAAI,QACC,cAAc;AACrB,OAAOC,GAAG,IAAIC,IAAI,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AACxD,SACEC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E;IACTiC,QAAQ,EAAE,UAAU;IACpB1G,KAAK,EAAE2E,eAAe;IACtBzE,MAAM,EAAEyE,eAAe;IACvBqD,YAAY,EAAErD,eAAe,GAAG,CAAC;IACjC0D,WAAW,EAAE,CAAC;IACd7C,WAAW,EAAE,SAAS;IACtBtC,eAAe,EAAE;EACnB,CAAC;EACDyC,iBAAiB,EAAE;IACjB,GAAG5H,UAAU,CAAC4K,kBAAkB;IAChCrB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBE,GAAG,EAAE,EAAE;IACPvE,eAAe,EAAE;EACnB,CAAC;EACD2C,cAAc,EAAE;IACdxC,KAAK,EAAE,SAAS;IAChBsE,QAAQ,EAAE,EAAE;IACZM,UAAU,EAAE,KAAK;IACjBP,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useRef","useState","ActivityIndicator","Pressable","StyleSheet","Text","useWindowDimensions","View","Svg","Defs","Mask","Rect","Camera","useCameraDevice","useCameraPermission","usePhotoOutput","usePreviewOutput","useTheme","withAlpha","Button","useSafeAreaInsets","computeCutout","jsx","_jsx","jsxs","_jsxs","DocumentCapture","side","orientation","instructions","captureLabel","permissionDeniedLabel","retryLabel","cancelLabel","processingLabel","onCaptured","onCancel","theme","insets","width","screenW","height","screenH","cameraRef","previewOutput","photoOutput","qualityPrioritization","device","physicalDevices","hasPermission","requestPermission","requestedOnce","setRequestedOnce","shooting","setShooting","error","setError","deviceTimeout","setDeviceTimeout","focusPoint","setFocusPoint","t","setTimeout","clearTimeout","supportsFocus","Boolean","supportsFocusMetering","handleTapToFocus","event","current","locationX","locationY","nativeEvent","focusTo","x","y","catch","key","Date","now","handleShutter","photo","capturePhotoToFile","flashMode","enableShutterSound","cutout","err","Error","message","String","style","styles","permission","backgroundColor","children","permissionText","color","textColor","row","variant","label","onPress","fullWidth","actionBtn","primaryColor","root","ref","absoluteFill","outputs","orientationSource","resizeMode","isActive","accessibilityLabel","DocumentMaskOverlay","pointerEvents","focusRing","left","FOCUS_RING_SIZE","top","topBar","iconBtn","iconBtnText","instructionsText","bottomBar","bottom","errorText","accessibilityRole","accessibilityState","disabled","shutter","borderColor","shutterDisabled","shutterCore","processingOverlay","size","processingText","CORNER_LENGTH","CORNER_THICKNESS","CUTOUT_RADIUS","DIM_COLOR","cutoutW","cutoutH","R","id","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":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAChE,SACEC,iBAAiB,EACjBC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,mBAAmB,EACnBC,IAAI,QACC,cAAc;AACrB,OAAOC,GAAG,IAAIC,IAAI,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AACxD,SACEC,MAAM,EACNC,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,gBAAgB,QAGX,4BAA4B;AAEnC,SAASC,QAAQ,EAAEC,SAAS,QAAQ,aAAa;AACjD,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,aAAa,QAAyB,uBAAuB;;AAEtE;AACA;AACA;AACA;AAHA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiCA,OAAO,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AAErD,eAAe,GAAG,CAAC;IACjC0D,WAAW,EAAE,CAAC;IACd7C,WAAW,EAAE,SAAS;IACtBrC,eAAe,EAAE;EACnB,CAAC;EACDwC,iBAAiB,EAAE;IACjB,GAAGjI,UAAU,CAACuG,YAAY;IAC1BqD,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBE,GAAG,EAAE,EAAE;IACPtE,eAAe,EAAE;EACnB,CAAC;EACD0C,cAAc,EAAE;IACdvC,KAAK,EAAE,SAAS;IAChBqE,QAAQ,EAAE,EAAE;IACZM,UAAU,EAAE,KAAK;IACjBP,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
* @fileoverview Liveness camera surface — front-facing vision-camera with an
|
|
5
5
|
* oval mask, status pill, and capture loop driven by the parent step.
|
|
6
6
|
*
|
|
7
|
-
* Capture strategy:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* Capture strategy: frame processors run on a worklet thread and don't expose
|
|
8
|
+
* the JPEG bytes back to JS without a custom native plugin. We avoid that
|
|
9
|
+
* complication by capturing stills to a file on a JS-level interval (matches
|
|
10
|
+
* the `setInterval` pattern in `web/LivenessModule.ts`). Real-world FPS lands
|
|
11
|
+
* around 3–8 fps which is sufficient for Iris's challenge cadence.
|
|
12
|
+
*
|
|
13
|
+
* The camera streams into three outputs at once — preview, photo and video —
|
|
14
|
+
* so the frames sent to Iris and the mp4 kept as evidence come off the same
|
|
15
|
+
* session without either interrupting the other.
|
|
13
16
|
*
|
|
14
17
|
* The parent owns the loop and the WebSocket — this component just exposes a
|
|
15
18
|
* `captureFrame` ref so the step can drive the timing while the camera stays
|
|
@@ -19,11 +22,21 @@
|
|
|
19
22
|
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
20
23
|
import { ActivityIndicator, Animated, Easing, StyleSheet, Text, useWindowDimensions, View } from 'react-native';
|
|
21
24
|
import Svg, { Defs, Ellipse, Mask, Rect } from 'react-native-svg';
|
|
22
|
-
import { Camera,
|
|
25
|
+
import { Camera, CommonResolutions, useCameraDevice, useCameraPermission, usePhotoOutput, usePreviewOutput, useVideoOutput } from 'react-native-vision-camera';
|
|
23
26
|
import { Button } from '../ui/primitives/Button';
|
|
24
27
|
import { useTheme, withAlpha } from '../ui/theme';
|
|
25
28
|
import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
|
|
26
29
|
|
|
30
|
+
/**
|
|
31
|
+
* The recorded liveness video, as this component reports it upwards.
|
|
32
|
+
*
|
|
33
|
+
* vision-camera v5 hands `onRecordingFinished` a bare file path, while the
|
|
34
|
+
* upload pipeline also wants the duration for the `liveness-verify` metadata.
|
|
35
|
+
* We read the duration off the `Recorder` before finalising and re-assemble
|
|
36
|
+
* both here, so the step keeps consuming one object instead of two loose
|
|
37
|
+
* values.
|
|
38
|
+
*/
|
|
39
|
+
|
|
27
40
|
/**
|
|
28
41
|
* Visual cue applied to the oval guide. The parent maps the current Iris
|
|
29
42
|
* challenge to one of these so the oval animates in a way that reinforces
|
|
@@ -36,21 +49,29 @@ export const LivenessCamera = /*#__PURE__*/forwardRef(function LivenessCamera(pr
|
|
|
36
49
|
const insets = useSafeAreaInsets();
|
|
37
50
|
const cameraRef = useRef(null);
|
|
38
51
|
const device = useCameraDevice('front');
|
|
39
|
-
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const previewOutput = usePreviewOutput();
|
|
53
|
+
// Frames for Iris: `speed` over quality on purpose. These are downscaled
|
|
54
|
+
// and re-compressed by `ImageManipulator` before they ever reach the wire,
|
|
55
|
+
// so a slow high-fidelity capture would only cost us frame cadence.
|
|
56
|
+
const photoOutput = usePhotoOutput({
|
|
57
|
+
qualityPrioritization: 'speed'
|
|
58
|
+
});
|
|
59
|
+
// Pin the recording to 720p so the mp4 stays a few MB instead of the
|
|
60
|
+
// device-default 1080p–4K bitrate (a 30 s session can otherwise produce a
|
|
61
|
+
// 50–80 MB file that times out on mobile uplinks). Face visibility for
|
|
62
|
+
// liveness evidence is fine at 720p. Audio off — the backend never uses it
|
|
63
|
+
// and recording it would demand the microphone permission.
|
|
64
|
+
const videoOutput = useVideoOutput({
|
|
65
|
+
targetResolution: CommonResolutions.HD_16_9,
|
|
66
|
+
// ~2 Mbps. NOTE the unit: v5 takes bits per second, where v4's
|
|
67
|
+
// `videoBitRate` prop took megabits — passing `2` here would ask for
|
|
68
|
+
// 2 bps and produce an unusable file. The device default (~8 Mbps at
|
|
69
|
+
// 720p) yields a 38 MB file for a 30 s session; ~2 Mbps is plenty for
|
|
70
|
+
// face visibility as compliance evidence and lands around 7–8 MB.
|
|
71
|
+
targetBitRate: 2_000_000,
|
|
72
|
+
enableAudio: false,
|
|
73
|
+
fileType: 'mp4'
|
|
74
|
+
});
|
|
54
75
|
const {
|
|
55
76
|
hasPermission,
|
|
56
77
|
requestPermission
|
|
@@ -74,16 +95,24 @@ export const LivenessCamera = /*#__PURE__*/forwardRef(function LivenessCamera(pr
|
|
|
74
95
|
const t = setTimeout(() => setDeviceTimeout(true), 4000);
|
|
75
96
|
return () => clearTimeout(t);
|
|
76
97
|
}, [device, hasPermission]);
|
|
98
|
+
|
|
99
|
+
// NOTE: `capturePhotoToFile`, not `capturePhoto`. The in-memory variant
|
|
100
|
+
// would hand us a native `Photo` that must be `dispose()`d by hand — in a
|
|
101
|
+
// loop running at up to ~7 fps for a whole session, a single missed
|
|
102
|
+
// dispose on an error path leaks native buffers. It would only pay off if
|
|
103
|
+
// we could sign the bytes directly, and we cannot: the frame still has to
|
|
104
|
+
// go through `ImageManipulator` for the downscale and the horizontal flip,
|
|
105
|
+
// and that API takes a URI, not a buffer. So the file is needed either
|
|
106
|
+
// way, and capturing straight to one keeps the hot loop free of manual
|
|
107
|
+
// memory management.
|
|
77
108
|
const takeFrame = useCallback(async () => {
|
|
78
109
|
if (inFlightRef.current) return null;
|
|
79
|
-
const camera = cameraRef.current;
|
|
80
|
-
if (!camera) return null;
|
|
81
110
|
inFlightRef.current = true;
|
|
82
111
|
try {
|
|
83
|
-
return await
|
|
84
|
-
|
|
112
|
+
return await photoOutput.capturePhotoToFile({
|
|
113
|
+
flashMode: 'off',
|
|
85
114
|
enableShutterSound: false
|
|
86
|
-
});
|
|
115
|
+
}, {});
|
|
87
116
|
} catch {
|
|
88
117
|
// Frame failures are non-fatal — the parent loop just retries on the
|
|
89
118
|
// next tick. Keep the camera mounted.
|
|
@@ -91,39 +120,56 @@ export const LivenessCamera = /*#__PURE__*/forwardRef(function LivenessCamera(pr
|
|
|
91
120
|
} finally {
|
|
92
121
|
inFlightRef.current = false;
|
|
93
122
|
}
|
|
94
|
-
}, []);
|
|
123
|
+
}, [photoOutput]);
|
|
95
124
|
|
|
96
|
-
// Recording is best-effort and orthogonal to the frame loop. We
|
|
97
|
-
// `
|
|
98
|
-
// parent calls it twice (e.g. on SESSION_COMPLETE and again on
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
125
|
+
// Recording is best-effort and orthogonal to the frame loop. We keep the
|
|
126
|
+
// live `Recorder` in a ref so `stopVideoRecording` is idempotent even if
|
|
127
|
+
// the parent calls it twice (e.g. on SESSION_COMPLETE and again on
|
|
128
|
+
// unmount). In v5 a Recorder is single-use: one is created per recording
|
|
129
|
+
// and discarded once it finishes.
|
|
130
|
+
const recorderRef = useRef(null);
|
|
131
|
+
// Duration read off the Recorder just before finalising. v5's
|
|
132
|
+
// `onRecordingFinished` only carries the file path, but the upload
|
|
133
|
+
// pipeline reports the duration in the `liveness-verify` metadata.
|
|
134
|
+
const recordedDurationRef = useRef(undefined);
|
|
135
|
+
const startVideoRecording = useCallback(async opts => {
|
|
136
|
+
if (recorderRef.current) return;
|
|
137
|
+
const recorder = await videoOutput.createRecorder({});
|
|
138
|
+
recorderRef.current = recorder;
|
|
139
|
+
recordedDurationRef.current = undefined;
|
|
140
|
+
try {
|
|
141
|
+
await recorder.startRecording(filePath => {
|
|
142
|
+
const duration = recordedDurationRef.current ?? (typeof recorder.recordedDuration === 'number' ? recorder.recordedDuration : undefined);
|
|
143
|
+
recorderRef.current = null;
|
|
144
|
+
opts.onRecordingFinished({
|
|
145
|
+
path: filePath,
|
|
146
|
+
duration
|
|
147
|
+
});
|
|
148
|
+
}, error => {
|
|
149
|
+
recorderRef.current = null;
|
|
150
|
+
opts.onRecordingError(error);
|
|
151
|
+
});
|
|
152
|
+
} catch (err) {
|
|
153
|
+
// Startup failed, so neither callback will ever fire — release the
|
|
154
|
+
// ref here or every later start would short-circuit on it.
|
|
155
|
+
recorderRef.current = null;
|
|
156
|
+
throw err;
|
|
104
157
|
}
|
|
105
|
-
|
|
106
|
-
recordingRef.current = true;
|
|
107
|
-
camera.startRecording({
|
|
108
|
-
fileType: 'mp4',
|
|
109
|
-
videoCodec: 'h264',
|
|
110
|
-
flash: 'off',
|
|
111
|
-
onRecordingFinished: video => {
|
|
112
|
-
recordingRef.current = false;
|
|
113
|
-
opts.onRecordingFinished(video);
|
|
114
|
-
},
|
|
115
|
-
onRecordingError: err => {
|
|
116
|
-
recordingRef.current = false;
|
|
117
|
-
opts.onRecordingError(err);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}, []);
|
|
158
|
+
}, [videoOutput]);
|
|
121
159
|
const stopVideoRecording = useCallback(async () => {
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
124
|
-
|
|
125
|
-
//
|
|
126
|
-
//
|
|
160
|
+
const recorder = recorderRef.current;
|
|
161
|
+
if (!recorder) return;
|
|
162
|
+
// Read the duration BEFORE stopping: once the recording is finalised the
|
|
163
|
+
// counter is no longer meaningful, and `onRecordingFinished` does not
|
|
164
|
+
// carry it.
|
|
165
|
+
try {
|
|
166
|
+
recordedDurationRef.current = typeof recorder.recordedDuration === 'number' ? recorder.recordedDuration : undefined;
|
|
167
|
+
} catch {
|
|
168
|
+
recordedDurationRef.current = undefined;
|
|
169
|
+
}
|
|
170
|
+
await recorder.stopRecording();
|
|
171
|
+
// recorderRef is cleared inside onRecordingFinished/onRecordingError to
|
|
172
|
+
// avoid a window where a follow-up start races with the unfinished stop.
|
|
127
173
|
}, []);
|
|
128
174
|
useImperativeHandle(ref, () => ({
|
|
129
175
|
takeFrame,
|
|
@@ -197,36 +243,27 @@ export const LivenessCamera = /*#__PURE__*/forwardRef(function LivenessCamera(pr
|
|
|
197
243
|
ref: cameraRef,
|
|
198
244
|
style: StyleSheet.absoluteFill,
|
|
199
245
|
device: device
|
|
200
|
-
//
|
|
201
|
-
//
|
|
202
|
-
//
|
|
246
|
+
// Preview, frames for Iris, and the mp4 recording all stream off the
|
|
247
|
+
// same session. This is the capability the whole liveness step rests
|
|
248
|
+
// on: the JPEG frames and the evidence video are produced at once,
|
|
249
|
+
// from one camera, without interrupting either.
|
|
203
250
|
,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
fps: 30
|
|
208
|
-
// Cap the encoder to ~2 Mbps. The default `'normal'` setting maps
|
|
209
|
-
// to ~8 Mbps for 720p, producing a 38 MB file for a 30 s session;
|
|
210
|
-
// ~2 Mbps is plenty for face visibility (compliance evidence) and
|
|
211
|
-
// keeps a 30 s recording around 7-8 MB.
|
|
251
|
+
outputs: [previewOutput, photoOutput, videoOutput]
|
|
252
|
+
// Cap the sensor at 30 fps. Resolution and bit-rate are set on the
|
|
253
|
+
// video output itself (see `useVideoOutput` above).
|
|
212
254
|
,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
// Enable mp4/h264 recording in parallel with takePhoto(). vision-camera
|
|
220
|
-
// v4 supports both surfaces on the same <Camera>; the recording runs
|
|
221
|
-
// best-effort and does not affect the frame cadence sent to Iris.
|
|
255
|
+
constraints: [{
|
|
256
|
+
fps: 30
|
|
257
|
+
}]
|
|
258
|
+
// Lock the recorded video orientation to the interface's so it is
|
|
259
|
+
// never upside-down or sideways on the back-office player. (v5's
|
|
260
|
+
// spelling of what v4 called `outputOrientation="preview"`.)
|
|
222
261
|
,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
// is written rotated −90° instead of +90°, leaving the recorded mp4
|
|
229
|
-
// upside-down. The JPEG frames we send to Iris are un-mirrored
|
|
262
|
+
orientationSource: "interface"
|
|
263
|
+
// We keep the front camera's default mirroring rather than forcing
|
|
264
|
+
// `isMirrored=false`: in v4 that override triggered an iOS bug where
|
|
265
|
+
// the tkhd matrix was written rotated −90° instead of +90°, leaving
|
|
266
|
+
// the mp4 upside-down. The frames we send to Iris are un-mirrored
|
|
230
267
|
// separately in `captureAndSend` via a horizontal flip with
|
|
231
268
|
// expo-image-manipulator, so TURN_LEFT/RIGHT still maps to the
|
|
232
269
|
// real-world yaw.
|