Manual Configuration
If you prefer not to use the Expo plugin you can configure react-native-video manually by editing the native project files directly. The steps below show the exact changes performed by the plugin so you can reproduce them in a plain React Native or bare Expo project.
iOS
Enable Background Audio
To allow video sound to continue when the app goes to the background add the audio mode to Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
Android
Configure ExoPlayer extensions
By default the library enables DASH & HLS extensions. You can fine-tune this by adding properties to gradle.properties:
# Enable / disable ExoPlayer extensions used by react-native-video
RNVideo_useExoplayerDash=true # DASH playback support
RNVideo_useExoplayerHls=true # HLS playback support
Set a value to false to exclude the corresponding extension and reduce APK size.
Enable Picture-in-Picture (PiP)
Add the android:supportsPictureInPicture flag to your main activity in AndroidManifest.xml:
<application>
<activity
android:name=".MainActivity"
android:supportsPictureInPicture="true"
...>
<!-- other attributes -->
</activity>
</application>
PiP requires API 26+ (Android 8.0). Make sure minSdkVersion is at least 26 when enabling this feature.
Verification
After the modifications:
- iOS – run
cd ios && pod installthen build the app from Xcode or vianpx react-native run-ios/npx expo run:ios. - Android – clean & rebuild the project:
./gradlew clean && ./gradlew :app:assembleDebugor simply runnpx react-native run-android/npx expo run:android.
If the build succeeds your manual configuration is complete.
Need an easier way?
Use the Expo plugin to apply exactly the same changes automatically during expo prebuild.