Skip to content
FrameworkStyle

background-video-skin

The background preset's chrome-less skin for ambient video

The only skin of the background preset: a chrome-less surface that sizes ambient video with no visible controls. See Skins for how packaged skins work and Presets for what the background preset ships.

Import

import '@videojs/html/background/skin';

The import registers the skin and every UI element it composes. The CDN player bundle registers this skin together with its player:

<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.0-beta.32/background.js"></script>

Usage

The skin goes between the player and the media element. It sizes the ambient video and renders no visible controls.

<background-video-player>
  <background-video-skin>
    <background-video src="video.mp4"></background-video>
  </background-video-skin>
</background-video-player>

Styling

Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. Customize skins documents the properties. The background video skin cannot be ejected.