mirror of
https://github.com/videojs/video.js.git
synced 2026-11-20 06:29:27 +01:00
Co-authored-by: Emily Dixon <edixon@mux.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Emily Dixon <puterbaugh0@gmail.com>
1.0 KiB
1.0 KiB
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