How to use the expo-core.NativeModulesProxy.ExponentCameraModule function in expo-core

To help you get started, we’ve selected a few expo-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / modules / expo-camera / src / Camera.js View on Github external
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 || {}

  };