Widget:MerlinVideoPlayer
From Coder Merlin
Revision as of 11:51, 23 November 2021 by Chukwuemeka-tinashe (talk | contribs) (Created page with "<video id="video"></video> <script> if (Hls.isSupported()) { var video = document.getElementById('video'); var hls = new Hls(); // bind them together hls.att...")
<video id="video"></video> <script>
if (Hls.isSupported()) { var video = document.getElementById('video'); var hls = new Hls(); // bind them together hls.attachMedia(video); hls.on(Hls.Events.MEDIA_ATTACHED, function () { console.log('video and hls.js are now bound together !'); hls.loadSource('http://my.streamURL.com/playlist.m3u8'); hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) { console.log( 'manifest loaded, found ' + data.levels.length + ' quality level' ); }); }); }
</script>