react-native-vision-camera
Version:
VisionCamera is the fastest and most powerful Camera for react-native.
26 lines (25 loc) • 1.46 kB
TypeScript
import type { CameraController } from '../../specs/CameraController.nitro';
import type { Constraint } from '../../specs/common-types/Constraint';
import type { MirrorMode } from '../../specs/common-types/MirrorMode';
import type { CameraDevice } from '../../specs/inputs/CameraDevice.nitro';
import type { CameraOutput } from '../../specs/outputs/CameraOutput.nitro';
import type { CameraSession } from '../../specs/session/CameraSession.nitro';
import type { CameraSessionConfig } from '../../specs/session/CameraSessionConfig.nitro';
interface Config {
mirrorMode?: MirrorMode;
allowBackgroundAudioPlayback?: boolean;
constraints?: Constraint[];
onSessionConfigSelected?: (config: CameraSessionConfig) => void;
onConfigured?: () => void;
getInitialZoom?: () => number | undefined;
getInitialExposureBias?: () => number | undefined;
}
/**
* Connect the given {@linkcode device} to the given {@linkcode outputs}
* with the given {@linkcode mirrorMode} applied to each output,
* and return a {@linkcode CameraController}.
*
* @note The {@linkcode outputs} have to be explicitly memoized.
*/
export declare function useCameraController(session: CameraSession | undefined, device: CameraDevice | undefined, outputs: CameraOutput[], { mirrorMode, constraints, onSessionConfigSelected, allowBackgroundAudioPlayback, getInitialExposureBias, onConfigured, getInitialZoom, }?: Config): CameraController | undefined;
export {};