# Video.js v10 — React Documentation (complete) > Every React docs page in one file (about 235k tokens). Index with descriptions: https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/llms.txt --- # React Installation Guide Install Video.js in React and build an accessible, customizable video player with composable controls Video.js is a **React video player component library**: composable primitives, hooks, and TypeScript types for building accessible, customizable players with minimal bundle sizes, advanced features, and consistency across browsers. > **Note: Release Candidate** > > Video.js v10 is a *release candidate*. We feel the API is stable and ready to build with. With your [feedback](https://github.com/videojs/v10/issues), a few documentation updates, and any final fixes, we look forward to shipping 10.0.0 soon. [Read the Release Candidate blog post](https://deploy-preview-2971--vjs10-site.netlify.app/blog/videojs-v10-release-candidate). > **Tip: Coming from another player?** > > Follow the migration guide for [Video.js 8](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-video-js-8), [Mux Player](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-mux-player), [Plyr](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-plyr), or [Media Chrome](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-media-chrome). Each maps your existing setup onto Video.js v10 instead of starting from scratch. ## AI Quickstart Paste this prompt into your coding agent: ``` Install the Video.js skill using one method. In Codex, run `codex plugin marketplace add videojs/skills`, then `codex plugin add videojs@videojs`, and start a new session. In Claude Code, run `claude plugin marketplace add videojs/skills`, then `claude plugin install videojs@videojs`, and start a new session or run `/reload-plugins`. In VS Code or Cursor, install `https://github.com/videojs/skills` as a plugin from source. For another agent, run `npx skills add https://github.com/videojs/skills --skill videojs` and select the agent. Then use the Video.js skill when working on this project. ``` ## Choose your JS framework Your framework determines which installation methods are available below. - [React](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/react): Components and hooks for React 19. Available methods: Packaged, Shadcn. - [HTML](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/html): Custom elements for any stack. Available methods: Packaged, Shadcn, CDN. - [Vue](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/vue): Vue 3 and Nuxt using the HTML custom elements. Available methods: Packaged, Shadcn. - [Svelte](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/svelte): Svelte 5 and SvelteKit using the HTML custom elements. Available methods: Packaged, Shadcn. ## Choose your use case - [Video](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/presets#preset-video) (`video`): On-demand video with full controls. - [Audio](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/presets#preset-audio) (`audio`): Podcasts, music, and audio-only playback. - [Live Video](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/presets#preset-live-video) (`live-video`): Streams with a Live button, no duration. - [Live Audio](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/presets#preset-live-audio) (`live-audio`): Live radio and audio streams. - [Background Video](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/presets#preset-background) (`background-video`): Muted, looping video behind your content. The live presets suit streams: they drop the duration and current-time displays that on-demand playback relies on, and they offer only media that exposes live-edge state. ## Choose your skin - **Default** (`default`): the complete control set with a modern, frosted look. Reference pages: [`VideoSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/video-skin), [`AudioSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/audio-skin), [`LiveVideoSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/live-video-skin), and [`LiveAudioSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/live-audio-skin). - **Minimal** (`minimal`): the same control set with clean, solid surfaces. Reference pages: [`MinimalVideoSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/video-minimal-skin), [`MinimalAudioSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/audio-minimal-skin), [`MinimalLiveVideoSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/live-video-minimal-skin), and [`MinimalLiveAudioSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/live-audio-minimal-skin). - **No skin** (`none`): player and media behavior without a packaged UI. Background Video always uses [`BackgroundVideoSkin`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/background-video-skin), whatever skin you choose. ## Choose your media source Available media sources depend on the use case: | Media source | Use cases | React component | Adapter package | | --- | --- | --- | --- | | HTML5 Video (`html5-video`) | Video | [`Video`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/video) | None | | HLS (`hls`) | Video, Live Video | [`HlsJsVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/hlsjs-video) | `@videojs/hlsjs-video` | | DASH (`dash`) | Video | [`DashVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/dash-video) | `@videojs/dash-video` | | Mux (`mux-video`) | Video, Live Video | [`MuxVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/mux-video) | `@videojs/mux-video` | | Vimeo (`vimeo`) | Video | [`VimeoVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/vimeo-video) | `@videojs/vimeo-video` | | YouTube (`youtube`) | Video | [`YouTubeVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/youtube-video) | `@videojs/youtube-video` | | Cloudflare Stream (`cloudflare`) | Video | [`CloudflareVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/cloudflare-video) | `@videojs/cloudflare-video` | | TikTok (`tiktok`) | Video | [`TikTokVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/tiktok-video) | `@videojs/tiktok-video` | | Twitch (`twitch`) | Video | [`TwitchVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/twitch-video) | `@videojs/twitch-video` | | HTML5 Audio (`html5-audio`) | Audio | [`Audio`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/audio) | None | | Mux (`mux-audio`) | Audio, Live Audio | [`MuxAudio`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/mux-audio) | `@videojs/mux-audio` | | Spotify (`spotify`) | Audio | [`SpotifyAudio`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/spotify-audio) | `@videojs/spotify-audio` | | Background Video (`background-video`) | Background Video | [`BackgroundVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/background-video) | None | HLS uses `HlsJsVideo` for broad compatibility. To reduce your bundle size, try our lightweight HLS engine, [`HlsVideo`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/hls-video). The keys in parentheses are the values the docs CLI (`npx @videojs/cli docs guides/installation/react`) accepts for its `--preset`, `--skin`, and `--media` flags. Run noninteractively, it also needs `--source-url` (pass `''` for demo media) and `--package-manager` (`npm`, `pnpm`, `yarn`, or `bun`). ## Choose how to install Pick one starting path. These are alternatives, not steps to run in sequence. Shadcn does not provide source for background video or a no-skin player. CDN availability also depends on the selected media source. - [Packaged](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/react): Install packages and use a ready-made skin. - [Shadcn](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/shadcn): Add editable React or HTML skin source to your project. The code below is a complete example for the default Video, Default skin, and HTML5 Video choices with demo media. For another combination, swap in the imports and markup from the preset, skin, and media reference pages linked above, and replace the demo URL with your own. If a preset and skin do not meet your user’s requirements, follow [Customize skins](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/customize-skins#style-skin-source) to add the files for the closest skin to the project. As you develop with Video.js, rely heavily on [llms.txt](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/llms.txt) to make sure you always have the latest information. ## Install the packages **npm** ```bash npm install @videojs/react ``` **pnpm** ```bash pnpm add @videojs/react ``` **yarn** ```bash yarn add @videojs/react ``` **bun** ```bash bun add @videojs/react ``` ## Add your player Add the player directly to `app/page.tsx`. It imports the selected player, skin, media, and extensions from the packages you installed. **app/page.tsx** ```tsx import '@videojs/react/video/skin.css'; import { VideoPlayer, VideoSkin, Video } from '@videojs/react/video'; export default function Page() { return ( ); } ``` That’s it! You now have a working Video.js player. ## Own the UI Packaged skins keep their controls and layout inside Video.js. When you need to add, remove, rearrange, or deeply restyle controls, use Shadcn to add the skin source to your project. Its components, layout, styles, and interactions become local files you can change. - [Install Video.js with Shadcn](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/shadcn?framework=react): Add editable skin source and build a working React or HTML player ## Choose what to do next ### Customize - [Customize skins](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/customize-skins#style-a-packaged-skin): Change colors, typography, sizing, and poster presentation - [UI components](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/architecture#ui-components): Explore the building blocks used by skins and custom controls - [Build your own component](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/build-your-own-component): Connect custom UI to player state and actions ### Deploy - [Browser support](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/browser-support): Check supported browsers and rendering environments - [TypeScript](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/typescript): Configure TypeScript for Video.js packages - [Bundlers](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/bundlers): Check bundler compatibility - [Content Security Policy](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/content-security-policy): Configure Content Security Policy for your player Something not quite right? You can [submit an issue](https://github.com/videojs/v10/issues) and ask for help, or explore [other support options](https://deploy-preview-2971--vjs10-site.netlify.app/html5-video-support). --- # Shadcn Installation Guide Use the Video.js Shadcn registry to add editable React or HTML custom-element skin source to your project Use Shadcn to add a Video.js skin's components, layout, styles, and interactions as React or HTML custom-element source. The CLI copies the files into your app so you can review and change them like any other source code. > **Note: Release Candidate** > > Video.js v10 is a *release candidate*. We feel the API is stable and ready to build with. With your [feedback](https://github.com/videojs/v10/issues), a few documentation updates, and any final fixes, we look forward to shipping 10.0.0 soon. [Read the Release Candidate blog post](https://deploy-preview-2971--vjs10-site.netlify.app/blog/videojs-v10-release-candidate). > **Tip: Coming from another player?** > > Follow the React migration guide for [Video.js 8](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-video-js-8), [Mux Player](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-mux-player), [Plyr](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-plyr), or [Media Chrome](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/guides/migrate-from-media-chrome). Each maps your existing setup onto Video.js v10 instead of starting from scratch. ## AI Quickstart Paste this prompt into your coding agent: ``` Install the Video.js skill using one method. In Codex, run `codex plugin marketplace add videojs/skills`, then `codex plugin add videojs@videojs`, and start a new session. In Claude Code, run `claude plugin marketplace add videojs/skills`, then `claude plugin install videojs@videojs`, and start a new session or run `/reload-plugins`. In VS Code or Cursor, install `https://github.com/videojs/skills` as a plugin from source. For another agent, run `npx skills add https://github.com/videojs/skills --skill videojs` and select the agent. Then use the Video.js skill when working on this project. ``` ## Choose your JS framework Your framework determines which installation methods are available below. - [React](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/react): Components and hooks for React 19. Available methods: Packaged, Shadcn. - [HTML](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/html): Custom elements for any stack. Available methods: Packaged, Shadcn, CDN. - [Vue](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/vue): Vue 3 and Nuxt using the HTML custom elements. Available methods: Packaged, Shadcn. - [Svelte](https://deploy-preview-2971--vjs10-site.netlify.app/docs/guides/installation/svelte): Svelte 5 and SvelteKit using the HTML custom elements. Available methods: Packaged, Shadcn. The Shadcn registry generates React or HTML source. Vue and Svelte can use the HTML custom-element source. - **React** (`react`) - Project templates: Next.js (`next`), Vite (`vite`), TanStack Start (`start`), Laravel (`laravel`), React Router (`react-router`), Astro (`astro`) - Styling: Tailwind CSS (`tailwind`), Vanilla CSS (`css`) - **HTML** (`html`) - Project templates: Vite (`vite`), Astro (`astro`), Laravel (`laravel`) - Styling: Vanilla CSS (`css`) ## Choose your use case - **Video** (`video`): On-demand video with full controls. - **Audio** (`audio`): Podcasts, music, and audio-only playback. - **Live Video** (`live-video`): Streams with a Live button, no duration. - **Live Audio** (`live-audio`): Live radio and audio streams. The live presets suit streams: they drop the duration and current-time displays that on-demand playback relies on, and they offer only media that exposes live-edge state. ## Choose your skin - **Default** (`default`): the complete control set with a modern, frosted look. - **Minimal** (`minimal`): the same control set with clean, solid surfaces. Shadcn copies either the Default or Minimal skin source into the project. It does not currently provide the background video skin or a no-skin option. ## Choose your media source Available media sources depend on the use case: | Media source | Use cases | React component | HTML element | Adapter package | | --- | --- | --- | --- | --- | | HTML5 Video (`html5-video`) | Video | [`Video`](https://deploy-preview-2971--vjs10-site.netlify.app/docs/framework/react/reference/components/video) | [`