@hexar/biometric-identity-sdk-react-native 1.18.0 → 1.20.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.
- package/dist/components/CameraCapture.d.ts.map +1 -1
- package/dist/components/CameraCapture.js +6 -2
- package/dist/components/VideoRecorder.d.ts.map +1 -1
- package/dist/components/VideoRecorder.js +5 -1
- package/package.json +1 -1
- package/src/components/CameraCapture.tsx +6 -2
- package/src/components/VideoRecorder.tsx +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraCapture.d.ts","sourceRoot":"","sources":["../../src/components/CameraCapture.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAmC,MAAM,oCAAoC,CAAC;AAIrH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"CameraCapture.d.ts","sourceRoot":"","sources":["../../src/components/CameraCapture.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAmC,MAAM,oCAAoC,CAAC;AAIrH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwStD,CAAC;AA0JF,eAAe,aAAa,CAAC"}
|
|
@@ -53,8 +53,12 @@ const CameraCapture = ({ mode, theme, language, onCapture, onCancel, }) => {
|
|
|
53
53
|
(0, biometric_identity_sdk_core_1.setLanguage)(language);
|
|
54
54
|
}
|
|
55
55
|
const strings = (0, biometric_identity_sdk_core_1.getStrings)();
|
|
56
|
-
// Get camera device (back camera for document capture)
|
|
57
|
-
|
|
56
|
+
// Get camera device (back camera for document capture).
|
|
57
|
+
// Only request wide-angle — telephoto/ultra-wide open multi-sensor sessions
|
|
58
|
+
// that are slow to release, blocking the front camera in the next step.
|
|
59
|
+
const device = (0, react_native_vision_camera_1.useCameraDevice)('back', {
|
|
60
|
+
physicalDevices: ['wide-angle-camera'],
|
|
61
|
+
});
|
|
58
62
|
const [deviceReady, setDeviceReady] = (0, react_1.useState)(!!device);
|
|
59
63
|
(0, react_1.useEffect)(() => {
|
|
60
64
|
checkPermissions();
|
|
@@ -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,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,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,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,CAy/BtD,CAAC;AA4PF,eAAe,aAAa,CAAC"}
|
|
@@ -103,7 +103,11 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
|
|
|
103
103
|
const [hasPermission, setHasPermission] = (0, react_1.useState)(false);
|
|
104
104
|
const cameraRef = (0, react_1.useRef)(null);
|
|
105
105
|
const { hasPermission: cameraPermission, requestPermission } = (0, react_native_vision_camera_1.useCameraPermission)();
|
|
106
|
-
|
|
106
|
+
// Prefer wide-angle (main) front camera — some Android devices expose
|
|
107
|
+
// multiple front sensors and the default may lack autofocus.
|
|
108
|
+
const device = (0, react_native_vision_camera_1.useCameraDevice)('front', {
|
|
109
|
+
physicalDevices: ['wide-angle-camera', 'ultra-wide-angle-camera'],
|
|
110
|
+
});
|
|
107
111
|
const [deviceReady, setDeviceReady] = (0, react_1.useState)(!!device);
|
|
108
112
|
const fadeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
109
113
|
const scaleAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
package/package.json
CHANGED
|
@@ -45,8 +45,12 @@ export const CameraCapture: React.FC<CameraCaptureProps> = ({
|
|
|
45
45
|
}
|
|
46
46
|
const strings = getStrings();
|
|
47
47
|
|
|
48
|
-
// Get camera device (back camera for document capture)
|
|
49
|
-
|
|
48
|
+
// Get camera device (back camera for document capture).
|
|
49
|
+
// Only request wide-angle — telephoto/ultra-wide open multi-sensor sessions
|
|
50
|
+
// that are slow to release, blocking the front camera in the next step.
|
|
51
|
+
const device = useCameraDevice('back', {
|
|
52
|
+
physicalDevices: ['wide-angle-camera'],
|
|
53
|
+
});
|
|
50
54
|
const [deviceReady, setDeviceReady] = useState(!!device);
|
|
51
55
|
|
|
52
56
|
useEffect(() => {
|
|
@@ -132,7 +132,11 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
|
|
|
132
132
|
const [hasPermission, setHasPermission] = useState(false);
|
|
133
133
|
const cameraRef = useRef<Camera>(null);
|
|
134
134
|
const { hasPermission: cameraPermission, requestPermission } = useCameraPermission();
|
|
135
|
-
|
|
135
|
+
// Prefer wide-angle (main) front camera — some Android devices expose
|
|
136
|
+
// multiple front sensors and the default may lack autofocus.
|
|
137
|
+
const device = useCameraDevice('front', {
|
|
138
|
+
physicalDevices: ['wide-angle-camera', 'ultra-wide-angle-camera'],
|
|
139
|
+
});
|
|
136
140
|
const [deviceReady, setDeviceReady] = useState(!!device);
|
|
137
141
|
|
|
138
142
|
const fadeAnim = useRef(new Animated.Value(0)).current;
|