Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onCameraReady?: Function,
useCamera2Api?: boolean,
flashMode?: number | string,
whiteBalance?: number | string,
autoFocus?: string | boolean | number,
pictureSize?: string,
videoStabilizationMode?: number,
onMountError?: MountErrorNativeEventType => void,
barCodeScannerSettings?: {},
onBarCodeScanned?: ({ type: string, data: string }) => void,
faceDetectorSettings?: {},
onFacesDetected?: ({ faces: Array<*> }) => void,
};
const CameraManager: Object =
NativeModulesProxy.ExponentCameraManager || NativeModulesProxy.ExponentCameraModule;
const EventThrottleMs = 500;
const _PICTURE_SAVED_CALLBACKS = {};
let _GLOBAL_PICTURE_ID = 1;
export default class Camera extends React.Component {
static Constants = {
Type: CameraManager.Type,
FlashMode: CameraManager.FlashMode,
AutoFocus: CameraManager.AutoFocus,
WhiteBalance: CameraManager.WhiteBalance,
VideoQuality: CameraManager.VideoQuality,
VideoStabilization: CameraManager.VideoStabilization || {}
};