@capgo/capacitor-audio-recorder
Overview
Section titled “Overview”Use @capgo/capacitor-audio-recorder when your Capacitor app needs microphone capture without bolting on a separate native module per platform. Start and stop clips, pause mid take, poll input level for waveforms, and listen for recording errors while users move between foreground and background (with the right native entitlements).
Typical fits: voice memos, in app audio messages, field notes, lightweight podcast capture, and speech first features that must work in the mobile WebView and in mobile browsers.
Platform support
Section titled “Platform support”| Platform | Support | Notes |
|---|---|---|
| iOS | Yes | AVFoundation capture, optional resetToPlaybackOnStop to avoid quiet playback after recording |
| Android | Yes | MediaRecorder, pause or resume on API 24+ |
| Web | Yes | Browser MediaRecorder, stopRecording returns a Blob instead of a file URI |
Core Capabilities
Section titled “Core Capabilities”startRecording- Start recording audio using the device microphone.pauseRecording- Pause the ongoing recording. Only available on Android (API 24+), iOS, and Web.resumeRecording- Resume a previously paused recording.stopRecording- Stop the current recording and persist the recorded audio.
Public API
Section titled “Public API”| Method | Description |
|---|---|
startRecording | Start recording audio using the device microphone. |
pauseRecording | Pause the ongoing recording. Only available on Android (API 24+), iOS, and Web. |
resumeRecording | Resume a previously paused recording. |
stopRecording | Stop the current recording and persist the recorded audio. |
cancelRecording | Cancel the current recording and discard any captured audio. |
getRecordingStatus | Retrieve the current recording status. |
getCurrentAmplitude | Retrieve the current input amplitude (microphone level) as a normalized number in the [0, 1] range. |
checkPermissions | Return the current permission state for accessing the microphone. |
requestPermissions | Request permission to access the microphone. |
addListener | Listen for recording errors. |
addListener | Listen for pause events emitted when a recording is paused. |
addListener | Listen for recording completion events. |
removeAllListeners | Remove all registered listeners. |
getPluginVersion | Get the native Capacitor plugin version. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-audio-recorder.
Keep going from @capgo/capacitor-audio-recorder
Section titled “Keep going from @capgo/capacitor-audio-recorder”If you are using @capgo/capacitor-audio-recorder to plan native media and interface behavior, connect it with Using @capgo/capacitor-audio-recorder for the native capability in Using @capgo/capacitor-audio-recorder, Using @capgo/capacitor-live-activities for the native capability in Using @capgo/capacitor-live-activities, @capgo/capacitor-live-activities for the implementation detail in @capgo/capacitor-live-activities, Using @capgo/capacitor-video-player for the native capability in Using @capgo/capacitor-video-player, and @capgo/capacitor-video-player for the implementation detail in @capgo/capacitor-video-player.