This guide takes you from a freshly installed package to a working audio player in four steps. You will configure the player once at the app root, add tracks to the queue, start playback, and then wire up a React component that reads live state from theDocumentation 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.
useAudioPro hook. By the end you will have a minimal but fully functional player with play/pause, a progress readout, and the currently playing track name.
Install the package
If you have not already installed React Native Audio Pro, follow the full Installation guide first. It covers the npm/yarn install, iOS pod install, Xcode Background Modes setup, and Android SDK version requirements.
Configure the player
Call
AudioPro.configure() once, as early as possible in your app’s lifecycle — ideally in index.js or the root App component, outside any render function. Configuration is stored internally and applied when the first play() call is made.index.js (or App.tsx)
Add tracks and start playback
Use You can also seek to a specific track by index:Gapless playback between tracks in the queue is enabled by default — no extra configuration is needed.
addMediaItems() to populate the queue, then call play() to begin. Tracks are plain objects matching the AudioProTrack shape: a required id, url, title, and artwork, with optional artist and album fields plus any custom key/value pairs.Complete Minimal Example
The component below brings all four steps together into a self-contained player. Copy it into your project, adjust the track URLs, and it will play audio with play/pause controls, a live progress display, and track information pulled directly from the hook.Next Steps
- Concepts: Configuration — Learn every
configure()option, content types, and debug flags. - API Reference: AudioPro — Full reference for every method, event type, and TypeScript interface.