react-native-transparent-video-player
v0.4.1
Published
Transparent (alpha) video playback for React Native — plays alpha-packed H.264 MP4s on every iOS/Android hardware decoder. Native AVPlayer+Metal view on iOS, native ExoPlayer+OpenGL view on Android, Skia on web. Includes a CLI to pack ProRes 4444 exports.
Downloads
485
Maintainers
Readme
react-native-transparent-video-player
Transparent (alpha-channel) video for React Native — as a plain H.264 MP4 that plays on every iOS and Android hardware decoder.
npx expo install react-native-transparent-video-player @shopify/react-native-skia react-native-reanimatedimport { TransparentVideo } from 'react-native-transparent-video-player';
<TransparentVideo
source={require('./assets/hero-packed.mp4')}
width={300}
height={300}
/>Pack any video with an alpha channel (ProRes 4444, VP9 WebM, …) with the bundled cross-platform CLI (needs ffmpeg in PATH):
npx pack-transparent-video hero-4444.mov # sensible defaults: 24 fps, quality 75%
npx pack-transparent-video hero-4444.mov --scale 50 --quality 60Renders via a native AVPlayer + Metal view on iOS (v0.4.0+), a native ExoPlayer + OpenGL view on Android (v0.3.0+) — no minSdkVersion override needed — and Skia on web. Both native platforms need expo-modules-core (built into every Expo app; bare RN: npx install-expo-modules) and a development-build rebuild after install (not Expo Go). Source switches are seamless: the view holds the last frame until the new clip's first frame is decoded.
Full docs, CLI options, format explanation, and the GIF/WebP comparison: https://github.com/LucaL1fe/react-native-transparent-video-player
