Installation
Install the package into your React Native project.
Requirements
- React Native 0.74 or later
- New Architecture enabled (Fabric + TurboModules)
- iOS 16.0 or later
- Android API 21 (Lollipop) or later
Install the package
$npm install @rntp/player
$yarn add @rntp/player
$pnpm add @rntp/player
iOS
Run pod install after installing:
cd ios && pod install Android
No additional steps required. The package auto-links with React Native’s new architecture.
Enable New Architecture
If you haven’t already, enable the New Architecture in your project.
In android/gradle.properties:
newArchEnabled=true In ios/Podfile:
ENV['RCT_NEW_ARCH_ENABLED'] = '1' Follow the official React Native New Architecture guide if you're enabling it for the first time.
Permissions
iOS
Add background audio capability to Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array> Android
No additional permissions needed for basic playback. For network streams, INTERNET permission is required (included by default in most projects).
Next steps
Head to Quick Start to set up your player.