video.js

Points Video.js installs to @videojs/html and @videojs/react, and throws coded errors for Video.js 8 patterns

video.js downloads video.js version video.js license

video.js类似的npm包:

npm下载趋势

3 年
🌟 在 video.js 的 README.md 中显示实时使用量图表,只需复制下面的代码。
## Usage Trend
[![Usage Trend of video.js](https://npm-compare.com/img/npm-trend/THREE_YEARS/video.js.png)](https://npm-compare.com/video.js#timeRange=THREE_YEARS)

Cumulative GitHub Star Trend

🌟 在 video.js 的 README.md 中显示 GitHub stars 趋势图表,只需复制下面的代码。
## GitHub Stars Trend
[![GitHub Stars Trend of video.js](https://npm-compare.com/img/github-trend/video.js.png)](https://npm-compare.com/video.js)

统计详情

npm包名称
下载量
Stars
大小
Issues
发布时间
License
video.js1,534,60340,06748.5 kB86113 天前Apache-2.0

video.js的README

video.js

package-badge

Video.js 10 players don't live in this package. Install the package for your framework:

Building withInstallDocs
HTML, Web Components, or another frameworknpm install @videojs/htmlHTML installation
Vue or Nuxtnpm install @videojs/htmlVue installation
Svelte or SvelteKitnpm install @videojs/htmlSvelte installation
Reactnpm install @videojs/reactReact installation
A <script> tag, without a bundlerNothing; load @videojs/cdnCDN 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.

AI Quickstart

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 skills

Then print version-matched installation instructions for your framework:

npx @videojs/cli agents init --framework html
npx @videojs/cli agents init --framework react

Run 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

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@8

For 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.

What this package contains

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":

  • The v8 module surface. The 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.

Community

If you need help with anything related to Video.js 10, or if you'd like to casually chat with other members:

License

Apache-2.0