videojs-video-element

1.2.2 • Public • Published

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

Related

Package Sidebar

Install

npm i videojs-video-element

Weekly Downloads

83

Version

1.2.2

License

MIT

Unpacked Size

15.1 kB

Total Files

5

Last publish

Collaborators

  • luwes
  • mux-npmjs