expo-camera
Version:
A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to t
26 lines (25 loc) • 1.02 kB
TypeScript
import React from 'react';
import { CapturedPicture, MountError, NativeProps, PictureOptions } from './Camera.types';
import CameraModule from './CameraModule/CameraModule';
export default class ExponentCamera extends React.Component<NativeProps> {
video?: number | null;
camera?: CameraModule;
state: {
type: null;
};
componentWillUnmount(): void;
componentWillReceiveProps(nextProps: any): void;
_updateCameraProps: ({ type, pictureSize, ...webCameraSettings }: NativeProps) => Promise<void>;
getCamera: () => CameraModule;
getAvailablePictureSizes: (ratio: string) => Promise<string[]>;
takePicture: (options: PictureOptions) => Promise<CapturedPicture>;
getAvailableCameraTypesAsync: () => Promise<string[]>;
resumePreview: () => Promise<void>;
pausePreview: () => Promise<void>;
onCameraReady: () => void;
onMountError: ({ nativeEvent }: {
nativeEvent: MountError;
}) => void;
_setRef: (ref: any) => void;
render(): JSX.Element;
}