videojs-video-element

muxinc
esm cjs
videojs-video-element JS library on GitHub videojs-video-element JS library on npm Download videojs-video-element JS library

A custom element for Video.js with an API that matches the `<video>` API

Version 1.4.1 License MIT Vulnerabilities 0
videojs-video-element has no homepage
videojs-video-element JS library on GitHub
videojs-video-element JS library on npm
Download videojs-video-element JS library
Keywords
video.jsvideojsvideoplayerweb componentcustom element

<videojs-video>

NPM Version NPM Downloads jsDelivr hits (npm) npm bundle size

A custom element for Video.js with an API that matches the <video> API.

Example (CodeSandbox)

<script type="module" src="https://cdn.jsdelivr.net/npm/videojs-video-element@1.0/+esm"></script>
<videojs-video controls src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/high.mp4"></videojs-video>

Install

First install the NPM package:

npm install videojs-video-element

Import in your app javascript (e.g. src/App.js):

import 'videojs-video-element';

Optionally, you can load the script directly from a CDN using JSDelivr:

<script type="module" src="https://cdn.jsdelivr.net/npm/videojs-video-element@1.0/+esm"></script>

This will register the custom elements with the browser so they can be used as HTML.