Skip to main content

Requirements

Before installing React Native Video, ensure your project meets these requirements:
  • React Native 0.75 or higher
  • react-native-nitro-modules (>=0.31.10) - See Nitro requirements
React Native Video v7 is built on the new React Native architecture and requires Nitro Modules for native bindings. Make sure your React Native version supports the new architecture.

Install dependencies

React Native Video requires react-native-nitro-modules as a peer dependency. Install it first:
npm install react-native-nitro-modules

Install React Native Video

Install the beta version of React Native Video v7:
npm install react-native-video@beta

iOS setup

For iOS, you need to install CocoaPods dependencies:
cd ios && pod install
If you encounter any issues during pod installation, try running pod install --repo-update to update your CocoaPods specs.

Android setup

For Android, the dependencies are automatically linked. No additional setup is required.
For React Native versions below 0.80, there is a bug that prevents proper error handling by Nitro Modules on Android. See the patch section below for a workaround.

Patch for React Native < 0.80

If you’re using React Native < 0.80, you need to apply a patch to fix error handling on Android. Without this patch, all errors will be thrown as unknown errors.
1

Install patch-package

Install patch-package as a dev dependency:
npm install --save-dev patch-package
2

Add postinstall script

Add the postinstall script to your package.json:
package.json
{
  "scripts": {
    "postinstall": "patch-package"
  }
}
3

Apply the patch

Create a patches directory in your project root and add the Nitro Modules patch. See the full installation guide for patch contents.

Expo support

React Native Video includes an Expo config plugin for automatic native configuration.
1

Install the package

Follow the installation steps above to add react-native-video to your Expo project.
2

Add the plugin

Add the React Native Video plugin to your app.json or app.config.js:
app.json
{
  "expo": {
    "plugins": [
      "react-native-video"
    ]
  }
}
3

Rebuild your app

Rebuild your app to apply the native configuration:
npx expo prebuild --clean
npx expo run:ios
npx expo run:android
The Expo plugin automatically configures permissions and capabilities needed for video playback, including background audio and Picture in Picture.

Verify installation

To verify that React Native Video is installed correctly, try importing it in your code:
App.tsx
import { useVideoPlayer, VideoView } from 'react-native-video';

console.log('React Native Video imported successfully!');
If the import succeeds without errors, you’re ready to start using React Native Video!

Next steps

Quick start

Get your first video playing in minutes

API reference

Explore the complete API documentation

Build docs developers (and LLMs) love