UNPKG

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

17 lines (16 loc) 1.14 kB
import { PictureOptions } from './../Camera.types'; import { CameraType, ImageSize, ImageType } from './CameraModule.types'; interface ConstrainLongRange { max?: number; min?: number; exact?: number; ideal?: number; } export declare function getImageSize(videoWidth: number, videoHeight: number, scale: number): ImageSize; export declare function toDataURL(canvas: HTMLCanvasElement, imageType: ImageType, quality: number): string; export declare function hasValidConstraints(preferredCameraType?: CameraType, width?: number | ConstrainLongRange, height?: number | ConstrainLongRange): boolean; export declare function captureImage(video: HTMLVideoElement, pictureOptions: PictureOptions): string; export declare function getIdealConstraints(preferredCameraType: CameraType, width?: number | ConstrainLongRange, height?: number | ConstrainLongRange): MediaStreamConstraints; export declare function getStreamDevice(preferredCameraType: CameraType, preferredWidth?: number | ConstrainLongRange, preferredHeight?: number | ConstrainLongRange): Promise<MediaStream>; export declare function isWebKit(): boolean; export {};