useAudioRecorder
HookFull-featured audio recorder using MediaRecorder. Supports start, stop, pause, and resume with elapsed-time tracking and Blob output.
core/use-audio-recorderInstallation
1 · Add registry to components.json
2 · Install component
Examples
Audio recording
Requires microphone permission.
00:00
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
audioTrackConstraints | MediaTrackConstraints | — | Passed to getUserMedia for audio quality control. |
onNotAllowedOrFound | () => void | — | Called when microphone permission is denied. |
(returns) startRecording | () => void | — | Start recording. |
(returns) stopRecording | () => void | — | Stop and finalize the Blob. |
(returns) pauseRecording | () => void | — | Pause without finalizing. |
(returns) resumeRecording | () => void | — | Resume a paused recording. |
(returns) recordingBlob | Blob | undefined | — | The recorded audio Blob (available after stopping). |
(returns) isRecording | boolean | — | True while actively recording. |
(returns) recordingTime | number | — | Elapsed recording time in seconds. |