React Native Audio Pro is a production-ready audio playback library built for long-form media apps — podcasts, audiobooks, music players, and anything that needs reliable playback while the screen is locked or the app is backgrounded. It exposes a clean imperative API and a React hook for state, wrapping Android’s Media3 engine and iOS’s AVFoundation so you get up-to-date native media session support on both platforms without any boilerplate.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/afkcodes/react-native-audio-pro/llms.txt
Use this file to discover all available pages before exploring further.
Quick Navigation
Installation
Add the package, run pod install on iOS, and confirm Android SDK versions.
Quickstart
Configure the player, load a queue, and display state in your first component.
Configuration
Deep-dive into content types, cache settings, progress intervals, and more.
API Reference
Full reference for every method, event, type, and enum in the library.
Core Features
These features are fully supported and maintained as the foundation of the library.| Feature | Description |
|---|---|
| Background Playback | Audio continues when the screen is locked or the app is backgrounded |
| Lock Screen Controls | Native media controls on Android (Media3 session) and iOS (MPRemoteCommandCenter) |
| Queue Management | addMediaItems, seekToMediaItem, removeMediaItem, moveMediaItem, and more |
| Hooks-Based State | useAudioPro() exposes state, position, duration, track, speed, volume, and errors |
| Artwork Support | Display album art in the lock screen and notification area |
| Playback Controls | play, pause, stop, seekTo, seekBy, setPlaybackSpeed, setVolume |
| Repeat & Shuffle | setRepeatMode (OFF / ONE / ALL) and setShuffleModeEnabled |
| Custom Headers | Pass per-track HTTP headers for both audio and artwork requests |
| Start Time Support | Begin playback from a specific millisecond offset |
| TypeScript | First-class types for every method, event, and configuration option |
Platform Requirements
| Requirement | Minimum Version |
|---|---|
| TypeScript | 5.0+ |
| React Native | 0.72+ |
| iOS | 17.0+ |
| Android | 8.0 (API 26)+ |
Android compileSdkVersion / targetSdkVersion | 35 |
Advanced Features
The following features exist in the codebase and work well in production, but sit outside the core scope of the library. Bug reports and feature requests for them have lower priority than core features.
- 🌧️ Ambient Audio — Play a secondary looping track (white noise, rain, etc.) simultaneously with the main player using
ambientPlay,ambientPause,ambientResume,ambientStop, andambientSetVolume. - 🎚️ Equalizer & Bass Boost (Android only) — Apply a 10-band equalizer with
setEqualizer(gains[])and a bass boost withsetBassBoost(0–1000). Built-inEQUALIZER_PRESETS,EQUALIZER_ADVANCED_PRESETS, andEQUALIZER_BANDSconstants are exported for convenience. - 🌙 Sleep Timer — Automatically pause playback after a set duration with
startSleepTimer(seconds)andcancelSleepTimer(). - 🔇 Silence Skipping (Android) — Skip silent segments automatically with
setSkipSilence(true). - 💾 Offline Caching — Control the on-device cache with
cacheEnabled,maxCacheSizeinconfigure(),getCacheSize(), andclearCache(). - 🔁 URL Refreshing (Sliding Window) — Update a track’s URL in the queue without interrupting playback using
updateTrack(index, track). This is the recommended pattern for expiring signed URLs (e.g., S3 or CloudFront).