package
Points Video.js installs to @videojs/html and @videojs/react, and throws coded errors for Video.js 8 patterns
npm install video.jsGitHub-flavored package documentation.
Across all versions, last 30 days.
5,973,983 in 30 days
Runtime metadata.
Tagged topics.
Video.js 10 players don't live in this package. Install the package for your framework:
| Building with | Install | Docs |
|---|---|---|
| HTML, Web Components, or another framework | npm install @videojs/html | HTML installation |
| Vue or Nuxt | npm install @videojs/html | Vue installation |
| Svelte or SvelteKit | npm install @videojs/html | Svelte installation |
| React | npm install @videojs/react | React installation |
A <script> tag, without a bundler | Nothing; load @videojs/cdn | CDN installation |
Playback engines such as HLS and DASH are separate adapter packages. The installation guides list them.
Without a bundler, load the player from jsDelivr and write the player markup:
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@<version>/video.js"></script>
<video-player>
<video-skin style="aspect-ratio: 16 / 9">
<video src="https://example.com/video.mp4" playsinline></video>
</video-skin>
</video-player>Replace <version> with an exact @videojs/cdn version in every CDN URL. A range can resolve each file to a different
release, and their shared chunks don't match.
Using an AI coding agent? Print the steps to install the Video.js skill, which teaches your agent to read the docs that match your Video.js version before writing code:
npx @videojs/cli agents skillsThen print version-matched installation instructions for your framework:
npx @videojs/cli agents init --framework html
npx @videojs/cli agents init --framework reactRun agents init without flags to list every option, such as the CDN method, skins, and media sources. Neither command
changes your project. npx downloads only the small @videojs/cli package, not a player.
Video.js 8 is alive and well. Brightcove maintains it as the legacy release line, with security fixes until October 1, 2028. Pin the major version to install it:
npm install video.js@8For v8 setup, releases, and issues, see the Video.js 8 repository and the v8 docs.
Ready to move a v8 player to Video.js 10? Follow the migration guide for HTML or React.
This package has no player and no dependencies. @videojs/core depends on it, so it appears in every @videojs/html
and @videojs/react install, but nothing imports it, so it adds nothing to your bundle.
Importing it registers no elements and doesn't scan the page, so v8 markup such as
<video class="video-js" data-setup="{}"> does nothing. It contains only shims, so v8 code that runs against Video.js 10
fails with a searchable code instead of "undefined is not a function":
videojs() default export, registerPlugin, getPlugin, registerComponent,
getComponent, getPlayer, and options each throw a VJS8_LEGACY_* code that links to its error page. Development
builds add the explanation and the HTML and React equivalents; production builds throw only the code and link.video.js/errors. The registry behind those codes: one entry per code with an explanation, the HTML and React
equivalents, and the stay-on-v8 line.video.js/dist/video-js.css. The v8 stylesheet path, resolving to an empty file so a leftover import doesn't fail
the build.If you need help with anything related to Video.js 10, or if you'd like to casually chat with other members:
Estimated unpacked size across 1 packages.
47.3 kB
Includes dependencies.
abarstow
alexander.barstow@gmail.com
essk
sarah@teaandbiscuits.net
gesinger
gesinger@gmail.com
gkatsev
me@gkatsev.com
heff
npm@heff.me
hswaminathan
hswaminathan@brightcove.com
imbcmdth
jon.carlos.rivera@gmail.com
lday
ldayananda@brightcove.com
mmcclure
npm@htbx.net
usmanonazim
usmanonazim@gmail.com
videojs-user
videojs@gkatsev.com
ddashkevich
ddashkevich@brightcove.com
phale
phale@brightcove.com
decepulis
de.cepulis@gmail.com
luwes
me@wesleyluyten.com
misteroneill
pgoneill@gmail.com
mmcc
matt@mmcc.io