ReferencePresets
Video preset
The general-purpose video preset — a player, feature bundle, skins, and media for on-demand video
@videojs/html/video is the general-purpose preset for on-demand video. It bundles the <video-player> element, the videoFeatures bundle it is configured with, and two skins, and plays through the browser’s native <video>. See Presets for how presets fit together and how to customize one.
Import
Import @videojs/html/video/neutral-skin instead for the neutral skin. Or load one CDN bundle that registers the player and a skin together:
video-neutral.js registers the neutral skin instead, and video-player.js registers <video-player> alone.
Usage
Player
@videojs/html/video/player registers <video-player>, whose class is VideoPlayerElement. It is a player element created by createPlayer with videoFeatures. It owns the player store but no layout. Put a skin or a <media-container> inside it.
content-title and poster come from the metadata feature. The element’s read-only store property returns its player store.
The preset root also exports a PlayerController bound to the video player’s store. Use it from any custom element inside <video-player>; see PlayerController.
Feature bundle
videoFeatures is the array of features the player is configured with:
Its type, VideoFeatures, is the tuple of those features in order. Import it from the package root:
To add or remove a feature, pass your own array to createPlayer. The skins expect the features they render controls for.
Skins
- VideoSkin — the default skin, with the modern, frosted look.
- NeutralVideoSkin — the visually lighter variant, closer to a classic control bar.
Media
The preset plays through a native <video>, so it registers no media component of its own. Swap it for any compatible media component, such as <hlsjs-video> for HLS.
Exports
The preset root, @videojs/html/video, has no side effects. Importing it never registers an element:
Registration entry points are side-effect-only: