How to use the react-native-camera.constants function in react-native-camera

To help you get started, we’ve selected a few react-native-camera 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 squatsandsciencelabs / OpenBarbellApp / app / shared_features / camera / VideoRecorder.js View on Github external
_record() {
        this.camera.capture({
            mode: Camera.constants.CaptureMode.video,
            audio: true
        }).then((data) => {
            if (this.props.setID) {
                this.props.saveVideo(this.props.setID, data.path, this.props.videoType);
            }
            // TODO: share options can be here, but for now just finish
        }).catch((err) => {
            console.tron.log("ERROR " + err);
            this.props.saveVideoError(this.props.setID, err);
            Alert.alert('There was an issue saving your video. Please try again');
        });
    }
github insiderdev / react-native-qrcode-app / js / BarcodeScannerApp.js View on Github external
toggleFlash() {
    this.setState({
      flashlightEnabled: !this.state.flashlightEnabled,
      torchMode: this.state.torchMode == Camera.constants.TorchMode.off ?
                    Camera.constants.TorchMode.on : Camera.constants.TorchMode.off
    });
  }
github insiderdev / react-native-qrcode-app / js / BarcodeScannerApp.js View on Github external
toggleFlash() {
    this.setState({
      flashlightEnabled: !this.state.flashlightEnabled,
      torchMode: this.state.torchMode == Camera.constants.TorchMode.off ?
                    Camera.constants.TorchMode.on : Camera.constants.TorchMode.off
    });
  }
github Skjutsgruppen / skjutsgruppen-reactnative / app / components / experience / camera.js View on Github external
constructor(props) {
    super(props);

    this.camera = null;

    this.state = {
      aspect: Camera.constants.Aspect.fill,
      captureTarget: Camera.constants.CaptureTarget.cameraRoll,
      type: Camera.constants.Type.front,
      orientation: Camera.constants.Orientation.auto,
      flashMode: Camera.constants.FlashMode.auto,
      loading: true,
      permissionDenied: false,
    };
  }
github react-native-community / react-native-camera / Example / Example.js View on Github external
constructor(props) {
    super(props);

    this.camera = null;

    this.state = {
      camera: {
        aspect: Camera.constants.Aspect.fill,
        captureTarget: Camera.constants.CaptureTarget.cameraRoll,
        type: Camera.constants.Type.back,
        orientation: Camera.constants.Orientation.auto,
        flashMode: Camera.constants.FlashMode.auto,
      },
      isRecording: false
    };
  }