@hexar/biometric-identity-sdk-react-native 1.13.0 → 1.14.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.
|
@@ -47,7 +47,6 @@ const { width, height } = react_native_1.Dimensions.get('window');
|
|
|
47
47
|
const CameraCapture = ({ mode, theme, language, onCapture, onCancel, }) => {
|
|
48
48
|
const [isCapturing, setIsCapturing] = (0, react_1.useState)(false);
|
|
49
49
|
const [hasPermission, setHasPermission] = (0, react_1.useState)(false);
|
|
50
|
-
const [deviceReady, setDeviceReady] = (0, react_1.useState)(false);
|
|
51
50
|
const cameraRef = (0, react_1.useRef)(null);
|
|
52
51
|
const { hasPermission: cameraPermission, requestPermission } = (0, react_native_vision_camera_1.useCameraPermission)();
|
|
53
52
|
if (language) {
|
|
@@ -56,6 +55,7 @@ const CameraCapture = ({ mode, theme, language, onCapture, onCancel, }) => {
|
|
|
56
55
|
const strings = (0, biometric_identity_sdk_core_1.getStrings)();
|
|
57
56
|
// Get camera device (back camera for document capture)
|
|
58
57
|
const device = (0, react_native_vision_camera_1.useCameraDevice)('back');
|
|
58
|
+
const [deviceReady, setDeviceReady] = (0, react_1.useState)(!!device);
|
|
59
59
|
(0, react_1.useEffect)(() => {
|
|
60
60
|
checkPermissions();
|
|
61
61
|
}, []);
|
|
@@ -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;AAcxE,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,EA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AAW,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,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,CAw6BtD,CAAC;AA6OF,eAAe,aAAa,CAAC"}
|
|
@@ -100,10 +100,10 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
|
|
|
100
100
|
const [frames, setFrames] = (0, react_1.useState)([]);
|
|
101
101
|
const framesRef = (0, react_1.useRef)([]);
|
|
102
102
|
const [hasPermission, setHasPermission] = (0, react_1.useState)(false);
|
|
103
|
-
const [deviceReady, setDeviceReady] = (0, react_1.useState)(false);
|
|
104
103
|
const cameraRef = (0, react_1.useRef)(null);
|
|
105
104
|
const { hasPermission: cameraPermission, requestPermission } = (0, react_native_vision_camera_1.useCameraPermission)();
|
|
106
105
|
const device = (0, react_native_vision_camera_1.useCameraDevice)('front');
|
|
106
|
+
const [deviceReady, setDeviceReady] = (0, react_1.useState)(!!device);
|
|
107
107
|
const fadeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
108
108
|
const scaleAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
109
109
|
const pulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
package/package.json
CHANGED
|
@@ -37,7 +37,6 @@ export const CameraCapture: React.FC<CameraCaptureProps> = ({
|
|
|
37
37
|
}) => {
|
|
38
38
|
const [isCapturing, setIsCapturing] = useState(false);
|
|
39
39
|
const [hasPermission, setHasPermission] = useState(false);
|
|
40
|
-
const [deviceReady, setDeviceReady] = useState(false);
|
|
41
40
|
const cameraRef = useRef<Camera>(null);
|
|
42
41
|
const { hasPermission: cameraPermission, requestPermission } = useCameraPermission();
|
|
43
42
|
|
|
@@ -48,6 +47,7 @@ export const CameraCapture: React.FC<CameraCaptureProps> = ({
|
|
|
48
47
|
|
|
49
48
|
// Get camera device (back camera for document capture)
|
|
50
49
|
const device = useCameraDevice('back');
|
|
50
|
+
const [deviceReady, setDeviceReady] = useState(!!device);
|
|
51
51
|
|
|
52
52
|
useEffect(() => {
|
|
53
53
|
checkPermissions();
|
|
@@ -128,11 +128,10 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
|
|
|
128
128
|
const [frames, setFrames] = useState<string[]>([]);
|
|
129
129
|
const framesRef = useRef<string[]>([]);
|
|
130
130
|
const [hasPermission, setHasPermission] = useState(false);
|
|
131
|
-
const [deviceReady, setDeviceReady] = useState(false);
|
|
132
|
-
|
|
133
131
|
const cameraRef = useRef<Camera>(null);
|
|
134
132
|
const { hasPermission: cameraPermission, requestPermission } = useCameraPermission();
|
|
135
133
|
const device = useCameraDevice('front');
|
|
134
|
+
const [deviceReady, setDeviceReady] = useState(!!device);
|
|
136
135
|
|
|
137
136
|
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
138
137
|
const scaleAnim = useRef(new Animated.Value(1)).current;
|