Skip to main content

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.

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.

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.
FeatureDescription
Background PlaybackAudio continues when the screen is locked or the app is backgrounded
Lock Screen ControlsNative media controls on Android (Media3 session) and iOS (MPRemoteCommandCenter)
Queue ManagementaddMediaItems, seekToMediaItem, removeMediaItem, moveMediaItem, and more
Hooks-Based StateuseAudioPro() exposes state, position, duration, track, speed, volume, and errors
Artwork SupportDisplay album art in the lock screen and notification area
Playback Controlsplay, pause, stop, seekTo, seekBy, setPlaybackSpeed, setVolume
Repeat & ShufflesetRepeatMode (OFF / ONE / ALL) and setShuffleModeEnabled
Custom HeadersPass per-track HTTP headers for both audio and artwork requests
Start Time SupportBegin playback from a specific millisecond offset
TypeScriptFirst-class types for every method, event, and configuration option

Platform Requirements

RequirementMinimum Version
TypeScript5.0+
React Native0.72+
iOS17.0+
Android8.0 (API 26)+
Android compileSdkVersion / targetSdkVersion35

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, and ambientSetVolume.
  • 🎚️ Equalizer & Bass Boost (Android only) — Apply a 10-band equalizer with setEqualizer(gains[]) and a bass boost with setBassBoost(0–1000). Built-in EQUALIZER_PRESETS, EQUALIZER_ADVANCED_PRESETS, and EQUALIZER_BANDS constants are exported for convenience.
  • 🌙 Sleep Timer — Automatically pause playback after a set duration with startSleepTimer(seconds) and cancelSleepTimer().
  • 🔇 Silence Skipping (Android) — Skip silent segments automatically with setSkipSilence(true).
  • 💾 Offline Caching — Control the on-device cache with cacheEnabled, maxCacheSize in configure(), getCacheSize(), and clearCache().
  • 🔁 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).

Build docs developers (and LLMs) love