Skip to main content
Video.js v10 is built around a three-part architecture that separates concerns and maximizes flexibility. Each part is designed to work independently or together, allowing you to use as much or as little of Video.js as you need.

1. State management

State is handled by a Player.Provider, which creates a central state store that all components can access. When you wrap your player in a Player.Provider, the components automatically connect to the state.
{/* All components inside automatically connect to state */}
<Player.Provider>
  <VideoSkin>
    <Video src="video.mp4" />
  </VideoSkin>
</Player.Provider>
You can access state and actions from anywhere within the provider with the usePlayer hook.

2. User interface

Use a prebuilt skin or build your own from the individual UI components.

Skins

Skins are complete, pre-designed player UIs that package components and styles together:
<Player.Provider>
  <VideoSkin>
    <Video src="video.mp4" />
  </VideoSkin>
</Player.Provider>
See Skins to learn more.

UI components

For more control than skins offer, you can build your own UI from individual components:
<Player.Provider>
  <Player.Container>
    <Video src="video.mp4" />
    <MediaControls>
      <PlayButton />
      {/* ... */}
    </MediaControls>
  </Player.Container>
</Player.Provider>
To get started with UI components, consider ejecting a skin and using its pre-styled components as a foundation.
See UI components to learn more.

3. Media

Media components display your media. They are essentially players with no UI — they handle video and audio rendering and expose a consistent API. Media components can be format-specific (HLS, DASH), service-specific (YouTube, Vimeo, Mux), or use-case-specific (background video).
DASH, YouTube, Vimeo, Mux, and more media elements are currently under development.
<Player.Provider>
  <VideoSkin>
    <HlsVideo src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM.m3u8" />
  </VideoSkin>
</Player.Provider>

Presets

Presets preconfigure the three parts above for a specific use case. The default presets are /video and /audio, covering the baseline controls you’d expect from the HTML <video> and <audio> tags. Beyond the defaults, presets target more specific use cases. For example, /background includes a media element with autoplay, mute, and loop built in, a skin with no controls, and just the features needed to power it:
import { createPlayer } from '@videojs/react';
import { backgroundFeatures, BackgroundVideo, BackgroundVideoSkin } from '@videojs/react/background';

const Player = createPlayer({ features: backgroundFeatures });

function Hero() {
  return (
    <Player.Provider>
      <BackgroundVideoSkin>
        <BackgroundVideo src="hero.mp4" />
      </BackgroundVideoSkin>
    </Player.Provider>
  );
}
See Presets to learn more.

Build docs developers (and LLMs) love