0.1.0 • Published 3 years ago

hls-playable-video-element v0.1.0

Weekly downloads
52
License
Apache-2.0
Repository
-
Last release
3 years ago

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>