mirror of
https://github.com/videojs/video.js.git
synced 2026-11-20 06:29:27 +01:00
Co-authored-by: videojs-release[bot] <324600730+videojs-release[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
react-native
video.js for react-native
Installation
npm install @videojs/react-native
Requires React Native 0.76 or later with the New Architecture enabled (the default since 0.76): the player view is a
Fabric component and the engine is a TurboModule, both generated from codegenConfig. React 18 and 19 are supported.
Usage
import { StyleSheet } from "react-native";
import { Video, VideoPlayer, VideoSkin } from "@videojs/react-native";
// ...
<VideoPlayer>
<VideoSkin style={{ width: 320, height: 180 }}>
<Video src="https://stream.mux.com/{PLAYBACK_ID}.m3u8" style={StyleSheet.absoluteFill} />
</VideoSkin>
</VideoPlayer>
Contributing
Repository setup and workflow are in the monorepo's
CONTRIBUTING.md. The native toolchain
this package needs, and the example app that exercises it, are documented in
apps/react-native/README.md.
License
MIT