useAudioRecorder

Hook

Full-featured audio recorder using MediaRecorder. Supports start, stop, pause, and resume with elapsed-time tracking and Blob output.

core/use-audio-recorder

Installation

1 · Add registry to components.json

2 · Install component

Examples

Audio recording

Requires microphone permission.

00:00

API Reference

PropTypeDescription
audioTrackConstraints
MediaTrackConstraintsPassed to getUserMedia for audio quality control.
onNotAllowedOrFound
() => voidCalled when microphone permission is denied.
(returns) startRecording
() => voidStart recording.
(returns) stopRecording
() => voidStop and finalize the Blob.
(returns) pauseRecording
() => voidPause without finalizing.
(returns) resumeRecording
() => voidResume a paused recording.
(returns) recordingBlob
Blob | undefinedThe recorded audio Blob (available after stopping).
(returns) isRecording
booleanTrue while actively recording.
(returns) recordingTime
numberElapsed recording time in seconds.