Recording
A finished audio recording, as a file the app can play, upload or keep.
Utilização
Configure a component-owned voice recorder.
Este tipo é usado por audio.recorder
// Configure a component-owned voice recorder.
import { Button, audio, type RecordingFormat, type RecordingQuality } from 'kuito';
export function Memo() {
const format: RecordingFormat = 'aac';
const quality: RecordingQuality = 'high';
const recorder = audio.recorder({ format, quality });
return <Button onPress={() => void recorder.start().catch(console.error)}>Record</Button>;
}
// Declare microphone permission; finish the file with recorder.stop().Declaração do tipo
export type Recording = AudioRecording;Membros 2
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
uri | string | Sim | — |
duration | number | Sim | — |
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.