
The most battle-tested open-source video player component for React Native with support for DRM, offline playback, HLS/DASH streaming, and more.
[!IMPORTANT]
This is a new version (v7) of react-native-video that is currently in active development.
You can expect breaking changes and missing features.
If you have any questions, please contact us at hi@thewidlarzgroup.com.
π Features
| π± Plays all video formats natively supported by iOS/Android | β
Available |
| βΆοΈ Local and remote playback | β
Available |
| π Streaming: HLS β’ DASH β’ SmoothStreaming | β
Available |
| π§© Expo plugin support | β
Available |
| π΄ Offline playback, video download, support for side-tracks and side-captions (via optional SDK) | β
Available |
| π± Picture in Picture | β
Available |
| ποΈ Fine-grained control over tracks, buffering & events | ποΈ In Development |
| π§ Advanced control over playback and buffering | β
Available |
| π DRM: Widevine & FairPlay (See free DRM stream example) | β
Available |
| π Basic Web Support | π TODO |
| πΊ TV Support | π TODO |
| π₯½ VisionOS Support | π TODO |
β¨ Project Status
| v5 and lower | β End-of-life Commercial Support Available | Old Architecture |
| v6 | π Maintained (community + TWG) | Old + New (Interop Layer) |
| v7 | π Active Development | Old + New (Full Support) |
react-native-video v7 introduces full support for the new React Native architecture, unlocking better performance, improved consistency, and modern native modules.
π Documentation & Examples
π Quick Start
Requirements
- React Native 0.75 or higher
react-native-nitro-modules (>=0.31.10) - Please see nitro requirements
Install
react-native-video requires react-native-nitro-modules (>=0.31.10) in your project.
npm install react-native-nitro-modules
Then install react-native-video
npm install react-native-video@beta
cd ios && pod install
For react-native < 0.80
`react-native` < 0.80 have bug that prevents to properly handle errors by nitro modules on Android.
We highly recommend to apply bellow patch for `react-native-nitro-modules` to fix this issue.
You can apply it using `patch-package`.
Without this patch you won't be able "recognize" errors, all will be thrown as unknown errors.
see installation guide
Usage
import { useVideoPlayer, VideoView } from 'react-native-video';
export default () => (
const player = useVideoPlayer(
'https://www.w3schools.com/html/mov_bbb.mp4',
(_player) => {
_player.play();
}
);
<VideoView
player={player}
style={{ width: '100%', aspectRatio: 16 / 9 }}
controls
/>
);
:inbox_tray: We're building a Pro Player!
We see the need for a more feature-rich video player. There is a gap between open source and commercial players, and we want to fill that gap with plugins.
Are you using a commercial player just for 1-2 features? Maybe you are paying for a license just to get Caching, Ads, or Analytics? Let us know. We want to identify these missing pieces and build them, so you can switch back to open source.
This is what we have already. Check out!
- Offline Video: Logic for downloading streams (HLS/DASH) and standard video files to enable offline playback.
- Background Uploader: Handles uploads even if the app is minimized (not strictly a player plugin, but super useful).
- Chapter Markers: Visual markers on the timeline to navigate content.
-> Tell us what to build next β or reach out to us sdk@thewidlarzgroup.com
πΌ TWG Services & Products
See how TWG helped Learnn ship a worldβclass player in record time - case study.
Contact us at hi@thewidlarzgroup.com
π Social
-
π½ React Summit US β How TWG helped Learnn boost video performance on React Native.
Watch the talk Β»
-
𧨠v7 deep dive β Why weβre building v7 with Nitro Modules
Watch on X Β»
-
π οΈ Well-maintained open-source library - What does it truly mean? - Bart's talk for React Native Warsaw
Watch here Β»
-
πΊ βOver the Topβ Panel - Building Streaming Apps for Mobile, Web, and Smart TVs - Bart giving his insights on the industry
Watch here Β»