hls-playable-video-element

0.1.0 • Public • Published

HLS playable video element

This custom video element is hls playable. It's powereded by hls.js.

<script defer src='../dist/index.js' onload="loaded()"></script>

<video is="hls-playable" controls></video>

<script>
  const video = document.querySelector('video');
  function loaded() {
    video.config = {
      debug: true,
    };

    video.src = "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8";

    video.addEventListener('hlsMediaAttached', () => {
      console.log('media attached')
    })
  }
</script>

Readme

Keywords

Package Sidebar

Install

npm i hls-playable-video-element

Weekly Downloads

1

Version

0.1.0

License

Apache-2.0

Unpacked Size

267 kB

Total Files

13

Last publish

Collaborators

  • mssknd