react-native-video-player

TheWidlarzGroupMIT长期未更新

给 React Native 应用用的视频播放器组件,自带可自定义的播放控件,省去自己搭控制栏的麻烦。

A <VideoPlayer /> component for React Native with custom controls

v0.16.3发布于 2025-05-05 18:43 UTC622star320fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
yarn add react-native-video-player react-native-video
cd ios && pod install
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

React Native 视频播放器组件,内置自定义控制条,底层基于 react-native-video

给 React Native 应用用的视频播放器组件,自带可自定义的播放控件,省去自己搭控制栏的麻烦。

核心能力

  • 提供 VideoPlayer 组件并暴露 ref 控制播放
  • 支持 thumbnail 缩略图与 endWithThumbnail 结束回显
  • 内置少量播放控制条,可显示时长
  • 通过 onError 回调上报播放错误
  • 底层复用 react-native-video 解码能力

容易踩的坑

必须同时安装 react-native-video 作为底层依赖;iOS 安装后需进入 ios 目录执行 pod install;README 未说明具体版本兼容范围,建议对照官方文档确认

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.16.3
  1. v0.16.3最新正式版2025-05-05 · 2025-05-05 18:43 UTC

    What's Changed

    New Contributors

    Full Changelog: https://github.com/TheWidlarzGroup/react-native-video-player/compare/v0.16.2...v0.16.3

  2. v0.16.22025-02-12 · 2025-02-12 14:28 UTC
    查看更新说明
  3. v0.16.12025-02-12 · 2025-02-12 13:46 UTC
    查看更新说明
  4. v0.16.02025-01-22 · 2025-01-22 11:52 UTC
    查看更新说明
  5. v0.15.02024-12-10 · 2024-12-10 20:14 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/TheWidlarzGroup/react-native-video-player/compare/v0.14.0...v0.15.0

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    react-native-video-player

    🎥 <VideoPlayer /> component for React Native with a few controls. This player uses react-native-video under the hood

    Documentation

    documentation is available at docs.thewidlarzgroup.com/react-native-video-player/

    Installation

    yarn add react-native-video-player react-native-video
    

    or

    npm install --save react-native-video-player react-native-video
    

    Then, install pods

    cd ios
    pod install
    

    Example

      import VideoPlayer, { type VideoPlayerRef } from 'react-native-video-player';
    
      const playerRef = useRef<VideoPlayerRef>(null);
    
      <VideoPlayer
        ref={playerRef}
        endWithThumbnail
        thumbnail={{
          uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg',
        }}
        source={{
          uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
        }}
        onError={(e) => console.log(e)}
        showDuration={true}
      />
    

    Future features

    Check out our Roadmap for what's coming up next! We're always working on new features and improvements, so stay tuned!

    Community support

    We have a discord server where you can ask questions and get help. Join the discord server

    Enterprise Support