<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Hls.js player with EcoCDN P2P WebRTC</title>
<script src="//cdn.jsdelivr.net/npm/ecocdn/vodjs/sigallv1.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/ecocdn/hlsjsv14.17.min.js"></script>
<style>
#video {
width: 720px;
margin-left: auto;
margin-right: auto;
display: block;
}
</style>
</head>
<body>
<video id="player" controls muted></video>
<script>
var video_url = "https://wowza.peer5.com/live/smil:bbb_abr.smil/playlist.m3u8";
var video = document.getElementById('player');
if (Hls.isSupported()) {
var hls = new Hls({
debug: false,
});
window.Tracker.initHls({player: hls, video_url: video_url});
hls.loadSource(video_url);
hls.attachMedia(video);
hls.on(Hls.Events.MEDIA_ATTACHED, function () {
video.muted = true;
video.play();
});
}
</script>
</body>
</html>