GuideGetting Started
CDN Installation Guide
Load Video.js from jsDelivr and build an HTML video player without a package manager
Video.js can run directly from browser-ready files on jsDelivr. This HTML-only path needs no package manager or build step: choose a player, load its scripts, and add the generated custom-element markup to your page.
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: Components and hooks for React 19. Available methods: Packaged, Shadcn.
- HTML: Custom elements for any stack. Available methods: Packaged, Shadcn, CDN.
- Vue: Vue 3 and Nuxt using the HTML custom elements. Available methods: Packaged, Shadcn.
- Svelte: Svelte 5 and SvelteKit using the HTML custom elements. Available methods: Packaged, Shadcn.
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. - Background Video (
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:<video-skin>,<audio-skin>,<live-video-skin>, and<live-audio-skin>. - Minimal (
minimal): the same control set with clean, solid surfaces. Reference pages:<video-minimal-skin>,<audio-minimal-skin>,<live-video-minimal-skin>, and<live-audio-minimal-skin>. - No skin (
none): player and media behavior without a packaged UI.
Background Video always uses <background-video-skin>, whatever skin you choose.
Choose your media source
Available media sources depend on the use case:
| Media source | Use cases | HTML element |
|---|---|---|
HTML5 Video (html5-video) | Video | <video> |
HLS (hls) | Video, Live Video | <hlsjs-video> |
DASH (dash) | Video | <dash-video> |
Mux (mux-video) | Video, Live Video | <mux-video> |
Vimeo (vimeo) | Video | <vimeo-video> |
YouTube (youtube) | Video | <youtube-video> |
Cloudflare Stream (cloudflare) | Video | <cloudflare-video> |
TikTok (tiktok) | Video | <tiktok-video> |
Twitch (twitch) | Video | <twitch-video> |
HTML5 Audio (html5-audio) | Audio | <audio> |
Mux (mux-audio) | Audio, Live Audio | <mux-audio> |
Spotify (spotify) | Audio | <spotify-audio> |
Background Video (background-video) | Background Video | <background-video> |
HLS uses <hlsjs-video> for broad compatibility. To reduce your bundle size, try our lightweight HLS engine, <hls-video>.
The keys in parentheses are the values the docs CLI (npx @videojs/cli docs guides/installation/cdn) accepts for its --preset, --skin, and --media flags. Run noninteractively, it also needs --source-url (pass '' for demo media).
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: Install packages and use a ready-made skin.
- Shadcn: Add editable React or HTML skin source to your project.
- CDN: Load the HTML player from jsDelivr without a package manager or build step.
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.
Choose your JS framework
Choose the JavaScript framework for your project.
Choose your use case
Choose the ready-made player that is closest to what you are building. Live presets add live-edge controls; background video is muted and loops behind your content.
Choose your skin
Choose how your player looks. You can add the files for any skin to your project and edit them later.
Choose your media source
Choose what the player will play. The CDN page only shows sources with a browser-ready bundle.
Optional. The URL also ends up in your generated code.
Choose how to install
Choose from the installation options available for your selections.
Load Video.js
Add these generated module scripts to your page. They register the player, selected skin, media element, and any extension the source needs.
Add your player
Place this generated markup where the player should appear. It uses the media source you selected above.
That’s it! You now have a working Video.js player without a package manager or build step.
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.
