How to use the expo.Camera.Constants function in expo

To help you get started, we’ve selected a few expo 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 DefinitelyTyped / DefinitelyTyped / types / expo / v31 / expo-tests.tsx View on Github external
);

() => (
    
);

async () => {
    await Brightness.setBrightnessAsync(0.65);
    await Brightness.setSystemBrightnessAsync(0.75);
    const br1 = await Brightness.getBrightnessAsync();
    const br2 = await Brightness.getSystemBrightnessAsync();
};

Camera.Constants.AutoFocus;
Camera.Constants.Type;
Camera.Constants.FlashMode;
Camera.Constants.WhiteBalance;
Camera.Constants.VideoQuality;
Camera.Constants.BarCodeType;
() => {
    return( {
        if (component) {
            component.recordAsync();
        }
    }} />);
};
async (camera: CameraObject) => {
    const picture = await camera.takePictureAsync({
        quality: 0.5,
        base64: true,
github DefinitelyTyped / DefinitelyTyped / types / expo / expo-tests.tsx View on Github external
);

() => (
    
);

async () => {
    await Brightness.setBrightnessAsync(0.65);
    await Brightness.setSystemBrightnessAsync(0.75);
    const br1 = await Brightness.getBrightnessAsync();
    const br2 = await Brightness.getSystemBrightnessAsync();
};

Camera.Constants.AutoFocus;
Camera.Constants.Type;
Camera.Constants.FlashMode;
Camera.Constants.WhiteBalance;
Camera.Constants.VideoQuality;
Camera.Constants.BarCodeType;
() => {
    return( {
        if (component) {
            component.recordAsync();
        }
    }} />);
};
async (camera: CameraObject) => {
    const picture = await camera.takePictureAsync({
        quality: 0.5,
        base64: true,
github allenmichael / petunia / petunia-mobile / screens / HomeScreen.js View on Github external
constructor(props){
    super(props);

    this.state = {
      modalVisible: false,
      comment: '',
      hasCameraPermission: null,
      type: Camera.Constants.Type.back,
      selectedIndex: null,
      displayCamera: false
    }

   }
github jamland / instabyte / src / components / Post / Camera.js View on Github external
onPress={() => {
                  this.setState({
                    type: this.state.type === Camera.Constants.Type.back
                    ? Camera.Constants.Type.front
                    : Camera.Constants.Type.back,
                  });
                }}
                >
github watanabeyu / expo-firebase-instagram / src / screens / TakeScreen / index.js View on Github external
flashMode={flashMode}
          ratio="1:1"
          ref={(ref) => { this.camera = ref; }}
        >
          
          {(cameraType === Camera.Constants.Type.back && mode === 'photo') && (
            
          )}
github jamland / instabyte / src / components / Post / Camera.js View on Github external
Dimensions,
  Platform,
  StyleSheet,
} from 'react-native';
import { Feather } from '@expo/vector-icons';
import { Camera, Permissions } from 'expo';
import { colors } from '../../config/Theme';

const win = Dimensions.get('window');
const DESIRED_RATIO = "1:1";

export default class CameraComponent extends React.Component {
  state = {
    isMounted: false,
    hasCameraPermission: null,
    type: Camera.Constants.Type.back,
    ratio: DESIRED_RATIO,
    photo: null,
    processingPhoto: false,
  };

  async componentDidMount() {
    this.setState({isMounted: true});

    const {status} = await Permissions.getAsync(Permissions.CAMERA);

    if (this.state.isMounted) {
      this.setState({ hasCameraPermission: status === 'granted' });
      this.processImage(null);

      if (status !== 'granted') {
        const {status} = await Permissions.askAsync(Permissions.CAMERA);
github dceddia / grillview / App.js View on Github external
render() {
    const { photo } = this.state;

    return (
      
    );
  }
}