audio.recorder
A recorder owned by the component setting up, as player is; { scope:
app } makes one the app holds.
Utilisation
Configure a component-owned voice 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().Signatures
(options?: AudioRecorderOptions): AudioRecorderParamètres
| Nom | Type | Requis | Description |
|---|---|---|---|
options | AudioRecorderOptions | Non | — Par défaut: {} |
Retourne
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.