The premium audio player for React Native.
Built on the New Architecture with synchronous native calls — background playback, Android Auto, audio caching, preloading, and more.
[!IMPORTANT] Starting with V5, react-native-track-player is commercially licensed. Personal and educational use remains free; commercial use requires a paid license — see rntp.dev/pricing. V4 and earlier remain available under Apache-2.0 on the
v4branch.
usePlaybackState, useIsPlaying, useProgress, useActiveMediaItem, and morenpm install @rntp/player
Then for iOS:
cd ios && pod install
Android links automatically.
import TrackPlayer from '@rntp/player';
// 1. Set up the player (call once at app startup, in the foreground on Android)
await TrackPlayer.setupPlayer({
contentType: 'music',
handleAudioBecomingNoisy: true,
android: { wakeMode: 'network' },
});
// 2. Add tracks and play
await TrackPlayer.setMediaItems([
{
url: 'https://example.com/track.mp3',
title: 'Track Title',
artist: 'Artist Name',
artwork: 'https://example.com/artwork.jpg',
},
]);
TrackPlayer.play();
// 3. Use hooks in your UI
import { useIsPlaying, useProgress, useActiveMediaItem } from '@rntp/player';
function PlayerUI() {
const { playing } = useIsPlaying();
const { position, duration } = useProgress();
const track = useActiveMediaItem();
return (/* your player UI */);
}
Full documentation, API reference, and guides are available at rntp.dev.
V5 is a complete rewrite and is not backwards-compatible with V4.
Key improvements in V5:
- Built on JSI — getProgress(), getQueue(), isPlaying() return synchronously
- Full TurboModule and Fabric support
- Rewritten Android and iOS native layers
Free for non-commercial use. Commercial use requires a license.
See license.txt for details or visit rntp.dev/pricing to purchase a commercial license.
For questions: team@doublesymmetry.com
$ claude mcp add react-native-track-player \
-- python -m otcore.mcp_server <graph>