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 modern audio playback library for React Native apps, purpose-built for podcasts, audiobooks, and music. It delivers background playback, native lock screen controls, a full queue API, ambient audio, and a clean hooks-based interface — all with first-class TypeScript support.

Introduction

Learn what React Native Audio Pro is and what it can do for your app.

Installation

Add the library to your Android and iOS React Native project.

Quickstart

Play your first track in under 5 minutes with a working code example.

API Reference

Full reference for every method, hook, type, and enum in the library.

What’s included

Background Playback

Keep audio running with the screen locked or the app in the background.

Queue Management

Add, remove, reorder, shuffle, and repeat tracks in a Media3-aligned queue.

Ambient Audio

Layer a secondary looping track — rain, white noise, or any ambient sound — independently from the main player.

Equalizer & Bass Boost

Apply a 10-band equalizer and bass boost to fine-tune your audio (Android).

Sleep Timer

Automatically pause playback after a configurable duration.

Error Handling

Understand Media3-aligned error codes and build resilient retry logic.

Quick install

npm install react-native-audio-pro
Then configure the player once at app startup and start playing:
App.tsx
import { AudioPro, AudioProContentType } from 'react-native-audio-pro';

AudioPro.configure({ contentType: AudioProContentType.MUSIC });

AudioPro.addMediaItems([
  {
    id: '1',
    url: 'https://example.com/track.mp3',
    title: 'My Track',
    artwork: 'https://example.com/cover.jpg',
    artist: 'Artist Name',
  },
]);

AudioPro.play();
1

Install the package

Install with npm or yarn and run pod install for iOS. See Installation for full platform setup.
2

Configure the player

Call AudioPro.configure() once at startup — set content type, cache size, and debug options. See Configuration.
3

Load tracks and play

Add tracks with addMediaItems(), then call play(). The player manages state, buffering, and lock screen controls automatically.
4

React to state in your UI

Use the useAudioPro() hook to subscribe to playback state, position, and the current track in any component. See useAudioPro.

Build docs developers (and LLMs) love