# Video.js v10 — React Components (complete) > Every React components page in one file (about 114k tokens). Index with descriptions: https://videojs.org/docs/framework/react/reference/components/llms.txt --- # 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. **App.tsx** ```tsx import { Video, videoFeatures } from '@videojs/react/video'; import { Container, createPlayer } from '@videojs/react'; const { Player } = createPlayer({ features: videoFeatures }); function App() { return ( {/* Everything inside can access the player store */} ); } ``` ## 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. ```tsx import { Container, createPlayer } from '@videojs/react'; import { videoFeatures } from '@videojs/react/video'; const { Player, usePlayer, useMedia } = createPlayer({ features: videoFeatures, }); ``` The [features](https://videojs.org/docs/framework/react/guides/features) you pass determine what state is available in the store. `videoFeatures` is a [preset](https://videojs.org/docs/framework/react/guides/presets) that includes playback, volume, fullscreen, and other standard video controls. - [createPlayer reference](https://videojs.org/docs/framework/react/reference/api/create-player) ## 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. ```tsx {/* skin — includes container + controls */} {/* your own component — can use usePlayer() */} ``` ## 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`](https://videojs.org/docs/framework/react/reference/components/player-container), not `Player`. `Player` is the Provider half of a React Context pair, with [`usePlayer`](https://videojs.org/docs/framework/react/reference/api/use-player) 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 Use `usePlayer` to read state or call actions from any component inside `Player`: **PlayPauseButton.tsx** ```tsx import { selectPlayback, usePlayer } from '@videojs/react'; function PlayPauseButton() { const playback = usePlayer(selectPlayback); if (!playback) return null; return ( ); } ``` - [usePlayer reference](https://videojs.org/docs/framework/react/reference/api/use-player) ## 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. ```tsx {/* outside container — still has store access */} {/* outside container — still has store access */} ``` --- # Container The player's visual and interaction surface for layout, fullscreen, focus, and user activity. The `Container` is the player’s physical surface. It defines the visual boundary, registers the fullscreen and activity target, and gives gesture and hotkey components a shared interaction surface. It lives inside a [`Player`](https://videojs.org/docs/framework/react/reference/components/player). ```tsx ``` ## How it’s created Import `Container` from the main React package. It connects to whichever `Player` contains it, so it does not need to be created for a specific feature set. ```tsx import { Container, createPlayer } from '@videojs/react'; import { Video, videoFeatures } from '@videojs/react/video'; const { Player } = createPlayer({ features: videoFeatures }); ``` - [`createPlayer` reference](https://videojs.org/docs/framework/react/reference/api/create-player) ## What it does ### Layout and fullscreen The container is the visual box around your media and controls. Put sizing, aspect ratio, positioning, and visual boundaries here — on `Container`, not `Player`. Place overlays inside it, use it as their positioning context, and measure it when your app needs the rendered player size. ```tsx ``` When the user goes fullscreen, the **container** goes fullscreen — not the video element. This keeps controls and other UI visible on top of the video, since they’re children of the container. React media components such as `MuxVideo` render a native media element, so the media itself has a box. The container remains the shared layout and fullscreen target for the media and its overlays. ### Media attachment Media discovery is handled by `Player`, not `Container`. When a media component like `