
一个用于 react-native 的 <Video /> 组件
概览
这是React Native上经过实战考验的开源视频播放器组件,支持DRM、离线播放、HLS/DASH流媒体流等功能。 这是react-native-video的新版本(v7),目前正在积极开发中。你可以预期会有破坏性变更和缺失功能。如有任何疑问,请通过 [email protected] 联系我们。 React-Native-Video v7 全面支持新的 React Native 架构,解锁了更优的性能、更优的一致性和现代化的原生模块。 - 📖 文档 - 🤖 AI 代理技能 — 正确使用 react-native-video,配合 AI 编码代理(Claude Code、Cursor、Codex);使用 NPX 技能安装 添加 TheWidlarzGroup/react-native-video - 📦 示例:基础使用法 - 📦 示例:免费 DRM 流 - React Native 0.75 或更高 - react-native-nitro-模块(>=0.31.10) - 请参见 Nitro 要求 React-Native-Video需要在你的项目中使用react-native-nitro模块(>=0.31.10)。 对于react-native react-native < 0。
概述(AI 翻译)
这是React Native上经过实战考验的开源视频播放器组件,支持DRM、离线播放、HLS/DASH流媒体流等功能。
[!重要] 这是目前正在积极开发的
react-native-video的新版本(v7)。 你可以预期会出现破坏性更改和缺失的功能。如有任何疑问,请通过 [email protected] 联系我们。
🔍 特色
| 特色 | 状态 |
|---|---|
| 📱 播放所有iOS/Android原生支持的视频格式 | ✅可用 |
| ▶️ 本地与远程播放 | ✅可用 |
| 🔁 流媒体:HLS • DASH • SmoothStreaming | ✅可用 |
| 🧩 Expo插件支持 | ✅可用 |
| 📴 离线播放、视频下载、支持侧面轨道和侧面字幕(通过可选SDK) | ✅可用 |
| 📱 画中画 | ✅可用 |
| 🎚️ 对轨道、缓冲和事件的细粒度控制 | 🏗️开发中 |
| 🧠 播放和缓冲的高级控制 | ✅可用 |
| 🔐 DRM:Widevine 和 FairPlay(参见免费 DRM 流示例) | ✅可用 |
| 🌐 基础网页支持 | ✅可用 |
| 📺 电视支持 | 📝待办事项 |
| 🥽 VisionOS 支持 | 📝待办事项 |
✨ 项目状态
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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-videothat is currently in active development. You can expect breaking changes and missing features.If you have any questions, please contact us at [email protected].
🔍 Features
| Feature | Status |
|---|---|
| 📱 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 | ✅ Available |
| 📺 TV Support | 📝 TODO |
| 🥽 VisionOS Support | 📝 TODO |
✨ Project Status
| Version | State | Architecture |
|---|---|---|
| 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
- 📖 Documentation
- 🤖 AI agent skill — use react-native-video correctly with AI coding agents (Claude Code, Cursor, Codex); install with
npx skills add TheWidlarzGroup/react-native-video - 📦 Example: Basic Usage
- 📦 Example: Free DRM Stream
🚀 Quick Start
Requirements
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add thewidlarzgroup/react-native-video