UNPKG

react-native-vision-camera

Version:

VisionCamera is the fastest and most powerful Camera for react-native.

34 lines (33 loc) 1.03 kB
import type { PreviewViewMethods, PreviewViewProps } from '../specs/views/PreviewView.nitro'; /** * The `<NativePreviewView />` component. * * The higher-level {@linkcode Camera} component * renders this native component under the hood. * * The `<NativePreviewView />` requires a {@linkcode CameraPreviewOutput} * that is also connected to a {@linkcode CameraSession} to * display a live Camera feed. * * @see {@linkcode PreviewView} * @see {@linkcode PreviewViewProps} * @see {@linkcode PreviewViewMethods} * @example * ```tsx * function App() { * const previewView = useRef<PreviewView>(null) * const previewOutput = usePreviewOutput() * * return ( * <NativePreviewView * style={StyleSheet.absoluteFill} * previewOutput={previewOutput} * hybridRef={callback((r) => { * previewView.current = r * })} * /> * ) * } * ``` */ export declare const NativePreviewView: import("react-native-nitro-modules").ReactNativeView<PreviewViewProps, PreviewViewMethods>;