ReferenceLayout
Player
The state boundary — creates a store and broadcasts it to all descendants.
The Player is the state boundary of your player. It creates a store and makes it available to every component inside it via context. Every player needs exactly one.
How it’s created
Call createPlayer() with a features array. It returns Player, usePlayer, and useMedia. Import the shared Container separately when building a custom layout.
The features you pass determine what state is available in the store. videoFeatures is a preset that includes playback, volume, fullscreen, and other standard video controls.
What lives inside it
Everything that needs player state goes inside Player: skins, containers, UI components, and your own custom components. Anything inside can access the store.
No visual presence
Player renders no DOM element of its own — it’s purely a state wrapper. Put sizing, positioning, borders, backgrounds, and DOM measurements on the Container, not Player.
Player is the Provider half of a React Context pair, with usePlayer as its consumer, and it renders nothing. If a component needs player state, lift Player above it the way you’d lift any Provider: wrapping a page section, a route, or even your whole app in Player costs nothing visually and keeps usePlayer available wherever you need it.
Accessing state
Extended player layouts
The player’s scope can extend beyond the fullscreen target. Playlists, transcripts, sidebars, and other supplementary UI can live inside Player but outside Container. They still have full access to the store, but they won’t go fullscreen with the video.