ump-plugin-video
v0.0.1
Published
UMP Video Plugin — <Video> native view + HTMLVideoElement runtime
Readme
ump-plugin-video
<Video> native view + HTMLVideoElement runtime for UMP apps. The
first plugin to ship its own native code (C++ / Objective-C / Java /
ArkTS) under the plugin-native infrastructure.
Install
npm install ump-plugin-videoUsage
import { Video } from 'ump-plugin-video';
<Video
src="https://cdn.example.com/clip.mp4"
autoplay
onLoadedMetadata={() => console.log('ready')}
/>Migration from ump-native
- import { Video } from 'ump-native';
+ import { Video } from 'ump-plugin-video';No API changes. The plugin's native code self-registers the Video
view kind on app launch — no changes to your UMPViewController /
MainActivity / Harmony entry are required.
What's in the box
- JS:
<Video>JSX component - iOS: AVPlayer-backed
UMPVideoHostFactory - Android: ExoPlayer-backed
UMPVideoHost - Harmony: AVPlayer-on-Harmony
UMPVideoHost - C++:
video_manager+video_listener(the JSI globals__ump_video_*are still in the host runtime; the plugin's C++ glue connects them to the platform-native player)
