RecordingOptions
Caps how long a Camera's video recording may run before it stops on its own.
Usage
Configure video capture.
// Configure video capture.
import { Button, Camera, cameraRef, type RecordingOptions } from 'kuito';
// A clip stops on its own after 15 seconds.
const clip: RecordingOptions = { maxDuration: 15 };
function Clip() {
const camera = cameraRef();
const record = async () => {
const video = await camera.current?.startRecording(clip);
console.log(video?.uri, video?.duration);
};
return (
<>
<Camera ref={camera} mode="video" flex={1} />
<Button onPress={record}>Record</Button>
</>
);
}Type declaration
export type RecordingOptions = SpecRecordingOptions;Members 1
| Name | Type | Required | Description |
|---|---|---|---|
maxDuration | number | No | Seconds; the recording stops on its own after it. None by default. |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.