@nebula.js/sn-video-player
v0.22.0
Published
Control for playing video content.
Readme
sn-video-player
Video player supernova for nebula.js
Installing
If you use npm: npm install @nebula.js/sn-video-player. You can also load through the script tag directly from https://unpkg.com.
Usage
import { embed } from "@nebula.js/stardust";
import videoPlayer from "@nebula.js/sn-video-player";
// 'app' is an enigma app model
const nuked = embed(app, {
types: [
{
// register the video player object
name: "sn-video-player",
load: () => Promise.resolve(videoPlayer),
},
],
});
nuked.render({
element,
type: "sn-video-player",
});Supported formats
- MP4
- WebM
- Ogg
- YouTube (requires user consent for cookies)
Notes
Based on video.js. YouTube playback uses a privacy-enhanced mode and defers loading the YouTube plugin until the user has accepted cookie consent.
