Skip to content

Latest commit

 

History

History

videojs-video-element

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

<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/[email protected]/+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/[email protected]/+esm"></script>

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

Related