CameraFlash
For pictures. torch keeps the light on instead, for the preview and videos.
Usage
Pause and resume a camera preview.
This type is used by Camera
// Pause and resume a camera preview.
import { Button, Camera, ref, type CameraHandle } from 'kuito';
function Scanner() {
// A plain ref holds the handle; cameraRef() adds ready and error signals.
const camera = ref<CameraHandle>();
return (
<>
<Camera ref={camera} flex={1} />
<Button onPress={() => void camera.current?.pausePreview()}>Pause</Button>
<Button onPress={() => void camera.current?.resumePreview()}>Resume</Button>
</>
);
}Type declaration
export type CameraFlash = 'off' | 'on' | 'auto';Type
"auto" | "off" | "on"Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.