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.
AudioPro.configure() should be called once during app startup — typically in your root component or app entry file — before any playback begins. It accepts an AudioProConfigureOptions object that controls how the player behaves. Configuration is merged with built-in defaults, so you only need to specify the options you want to override.
Options
Controls the audio session category on both Android and iOS, which affects routing, ducking, and interruption behavior. Use
AudioProContentType.MUSIC for music and long-form audio, or AudioProContentType.SPEECH for podcasts, audiobooks, and voice content.Enables verbose logging from both the native layer and the TypeScript layer. Useful during development to trace playback events, state transitions, and method calls. Disable in production builds.
When
debug is true, setting this to true will also include PROGRESS events in the debug logs. Progress events fire frequently (at the progressIntervalMs rate), so this option is disabled by default to avoid log flooding.The frequency in milliseconds at which
PROGRESS events are emitted during playback. Accepts values between 100 and 10000. Lower values give smoother scrubber UI updates at the cost of more frequent events.The number of milliseconds used for skip-forward and skip-back operations, as well as the
REWIND_30 and FORWARD_30 notification buttons. Defaults to 30 seconds (30000 ms).Sets the default repeat mode for the queue. Accepts one of:
AudioProRepeatMode.OFF— no repeat (default)AudioProRepeatMode.ONE— repeat the current track indefinitelyAudioProRepeatMode.ALL— repeat the entire queue after the last track ends
AudioPro.setRepeatMode().Sets the initial shuffle state. When
true, the queue is played in a randomised order. Can be changed at runtime with AudioPro.setShuffleModeEnabled().Maximum disk cache size in bytes. Defaults to 500 MB (524,288,000 bytes). This is a global setting that may only take full effect during the first initialization of the underlying cache store.
Enables or disables the on-device audio cache. When
true, streamed audio is cached locally so subsequent plays of the same URL skip the network request.Changing
cacheEnabled requires a session restart to take full effect on the underlying data source. This means either force-quitting the app or calling AudioPro.stop() and then re-calling configure() before the next play().When enabled, the player automatically skips silent segments during playback. Android only. Has no effect on iOS.
Complete Example
Default Values
All fields are optional. The following defaults are applied when a field is omitted:| Option | Default |
|---|---|
contentType | AudioProContentType.MUSIC |
debug | false |
debugIncludesProgress | false |
progressIntervalMs | 1000 |
skipIntervalMs | 30000 |
repeatMode | AudioProRepeatMode.OFF |
shuffleMode | false |
cacheEnabled | true |
maxCacheSize | 524288000 (500 MB) |
skipSilence | false |