Created
August 29, 2018 20:39
-
-
Save ssaguiar/bf5d1f80fe630f46844f551c810ca5c8 to your computer and use it in GitHub Desktop.
Simple 20 channels mosaic using hls.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="carousel"><video id="video01" width="320" height="180" controls muted></video><div id="buttonscontainer"><p>Channel Test01</p><button type="button" onclick="alert('Button Channel 1')"><i class="fa fa-sync-alt" aria-hidden="true"></i> Restart</button></div></div> | |
<script> | |
if(Hls.isSupported()) { | |
var video01 = document.getElementById('video01'); | |
video01.setAttribute("controls","controls") | |
var hls = new Hls(); | |
hls.loadSource('http://0.0.0.0/live/playlist.m3u8'); | |
hls.attachMedia(video01); | |
hls.on(Hls.Events.MANIFEST_PARSED,function() { | |
video01.play(); | |
}); | |
} | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<!doctype html>
<title>hls.js demo</title>