Ninja Pumpkin Mutants

    videojs-video-element

    0.2.0 • Public • Published

    <videojs-video>

    A custom element (web component) for Video.js.

    The element API matches the HTML5 <video> tag, so it can be easily swapped with other media, and be compatible with other UI components that work with the video tag.

    One of the goals was to have <videojs-video> seamlessly integrate with Media Chrome.

    🙋 Looking for a YouTube video element? Check out <youtube-video>.

    Example (CodeSandbox)

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

    Installing

    <videojs-video> is packaged as a javascript module (es6) only, which is supported by all evergreen browsers and Node v12+.

    Loading into your HTML using <script>

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

    Adding to your app via npm

    npm install videojs-video-element --save

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

    import 'videojs-video-element';

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

    Related

    Install

    npm i videojs-video-element

    DownloadsWeekly Downloads

    22

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    21.4 kB

    Total Files

    11

    Last publish

    Collaborators

    • luwes