RecordingOptions
Caps how long a Camera's video recording may run before it stops on its own.
Utilização
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>
</>
);
}Declaração do tipo
export type RecordingOptions = SpecRecordingOptions;Membros 1
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
maxDuration | number | Não | Seconds; the recording stops on its own after it. None by default. |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.