ReferencePresets
Video preset
The general-purpose video preset — a player, feature bundle, skins, and media for on-demand video
@videojs/react/video is the general-purpose preset for on-demand video. It bundles VideoPlayer, the videoFeatures bundle it is configured with, two skins, and the Video media component. See Presets for how presets fit together and how to customize one.
Import
Each skin has its own stylesheet. Import @videojs/react/video/neutral-skin.css instead when you use NeutralVideoSkin.
Usage
Player
VideoPlayer is a Player created by createPlayer with videoFeatures. It provides the player store to its descendants and renders no DOM element of its own.
VideoPlayerProps types its props:
title and poster come from the metadata feature.
The preset also exports a usePlayer hook typed to videoFeatures. Use it from any component inside VideoPlayer; see usePlayer.
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 exports Video, which renders a native <video>. Swap it for any compatible media component, such as HlsJsVideo for HLS.
Exports
@videojs/react/video exports:
Stylesheets: @videojs/react/video/skin.css and @videojs/react/video/neutral-skin.css.