Skip to content

Demo

TIP

See the examples/ directory for runnable HTML demos covering all plugin combinations.

Quick Demo

A minimal player with HLS streaming and UI:

html
<div id="player">
  <video src="https://example.com/stream.m3u8" autoplay muted playsinline></video>
</div>
ts
import { createPlayer } from "@videts/vide";
import { hls } from "@videts/vide/hls";
import { ui } from "@videts/vide/ui";
import "@videts/vide/ui/theme.css";

const player = createPlayer(document.querySelector("video")!);
player.use(hls());
player.use(ui({ container: document.getElementById("player")! }));

With VAST Pre-Roll

html
<div id="player">
  <video src="https://example.com/stream.m3u8" autoplay muted playsinline></video>
</div>
ts
import { createPlayer } from "@videts/vide";
import { hls } from "@videts/vide/hls";
import { ui } from "@videts/vide/ui";
import { vast } from "@videts/vide/vast";
import "@videts/vide/ui/theme.css";

const player = createPlayer(document.querySelector("video")!);
player.use(hls());

const uiPlugin = ui({ container: document.getElementById("player")! });
player.use(uiPlugin);
player.use(vast({
  tagUrl: "https://pubads.g.doubleclick.net/gampad/ads?...",
  adPlugins: uiPlugin.getAdPlugin(),
}));

Available Examples

ExamplePluginsFile
Overviewindex.html
Without UICore onlywithout-ui.html
UI controlsCore + UIui.html
Headless UICore + UI (individual)ui-headless.html
Standalone UICore + UI (standalone)ui-standalone.html
HLS streamingCore + UI + HLShls.html
DASH streamingCore + UI + DASHdash.html
UI + VASTCore + UI + VASTui-vast.html
HLS + VASTCore + UI + HLS + VASThls-vast.html
DASH + VASTCore + UI + DASH + VASTdash-vast.html
VAST debugCore + VASTvast-debug.html
VAST wrapperCore + VASTwrapper.html
Ad PodCore + UI + VASTad-pod.html
Companion AdsCore + UI + VASTcompanion-ads.html
NonLinear AdsCore + UI + VASTnonlinear-ads.html
VMAP schedulingCore + UI + VMAPvmap.html
SSAICore + UI + HLS + SSAIssai.html
OMID viewabilityCore + UI + VAST + OMIDomid.html
SIMID interactiveCore + UI + VAST + SIMIDsimid.html
CDN all-in-oneAll (script tag)cdn-all.html
CDN individualCore + plugins (script tag)cdn-individual.html
CDN + adsCore + VAST (script tag)cdn-ads.html

To run examples locally:

sh
git clone https://github.com/hogekai/vide.git
cd vide
pnpm install
pnpm build
# Open examples/*.html with a local server (e.g., VS Code Live Preview)

Plugin Sizes

Plugingzip
Core2.8 KB
VAST6.6 KB
VMAP7.1 KB
HLS1.4 KB
DASH1.4 KB
DRM1.7 KB
SSAI2.0 KB
OMID1.7 KB
SIMID2.4 KB
VPAID1.8 KB
IMA3.5 KB
UI5.3 KB
theme.css3.5 KB