react-native-camera-kit
Version:
A high performance, fully featured, rock solid camera library for React Native applications
73 lines (72 loc) • 2.27 kB
TypeScript
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
import type { DirectEventHandler, Double, Float, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
type OnReadCodeData = {
codeStringValue: string;
codeFormat: string;
};
type OnOrientationChangeData = {
orientation: Int32;
};
type OnZoom = {
zoom: Double;
};
type OnFaceDetectedData = {
faces: {
id: Int32;
yaw: Double;
pitch: Double;
roll: Double;
boundsX: Double;
boundsY: Double;
boundsWidth: Double;
boundsHeight: Double;
}[];
};
export interface NativeProps extends ViewProps {
flashMode?: string;
focusMode?: string;
maxPhotoQualityPrioritization?: string;
zoomMode?: string;
zoom?: WithDefault<Double, -1>;
maxZoom?: WithDefault<Double, -1>;
torchMode?: string;
cameraType?: string;
scanBarcode?: boolean;
showFrame?: boolean;
laserColor?: ColorValue;
frameColor?: ColorValue;
ratioOverlay?: string;
ratioOverlayColor?: ColorValue;
resetFocusTimeout?: WithDefault<Int32, -1>;
resetFocusWhenMotionDetected?: boolean;
resizeMode?: string;
scanThrottleDelay?: WithDefault<Int32, -1>;
iOsDeferredStart?: boolean;
barcodeFrameSize?: {
width?: WithDefault<Float, 300>;
height?: WithDefault<Float, 150>;
};
shutterPhotoSound?: boolean;
onOrientationChange?: DirectEventHandler<OnOrientationChangeData>;
onZoom?: DirectEventHandler<OnZoom>;
onError?: DirectEventHandler<{
errorMessage: string;
}>;
onReadCode?: DirectEventHandler<OnReadCodeData>;
onCaptureButtonPressIn?: DirectEventHandler<{}>;
onCaptureButtonPressOut?: DirectEventHandler<{}>;
allowedBarcodeTypes?: string[];
faceDetectionEnabled?: boolean;
faceDetectionThrottleMs?: WithDefault<Int32, -1>;
onFaceDetected?: DirectEventHandler<OnFaceDetectedData>;
onFaceDetectionInstallStatus?: DirectEventHandler<{
state: string;
}>;
shutterAnimationDuration?: WithDefault<Int32, -1>;
outputPath?: string;
onPictureTaken?: DirectEventHandler<{
uri: string;
}>;
}
declare const _default: HostComponent<NativeProps>;
export default _default;