Vai al contenuto

@capgo/capacitor-plugin-audiosession

Listen for audio route changes, react to interruptions, and reroute playback to the speaker without leaving Capacitor.

Capgo’s AudioSession plugin gives you fine-grained control over the iOS AVAudioSession layer so you can gracefully handle headphones, Bluetooth devices, and unexpected interruptions.

Route awareness

Detect when users plug or unplug headsets, AirPods, Bluetooth speakers, and more.

Speaker override

Force playback through the built-in speaker when you need hands-free audio.

Interruption handling

React to interruption events such as phone calls or Siri to pause and resume audio safely.

Type safety

Strong TypeScript definitions make it easy to build resilient audio experiences.

This plugin targets iOS where AVAudioSession control is required. On other platforms the calls resolve without effect, letting you keep one shared code path.