Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

51 lines (44 sloc) 1.41 KB
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Hls.js DNA Wrapper</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
}
</style>
<link rel="stylesheet" href="//samples.streamroot.io/web/assets/demo-pages.css">
<!-- Makes the header -->
<script src="//samples.streamroot.io/web/assets/header.js"></script>
<!-- Builds -->
<script src="//cdn.jsdelivr.net/npm/hls.js@0.12.2/dist/hls.min.js"></script>
<script src="//cdn.streamroot.io/hlsjs-dna-wrapper/1/stable/hlsjs-dna-wrapper.js"></script>
<!-- Graphs -->
<script src="//tools.streamroot.io/usage-graphs/stable/graphs.js"></script>
</head>
<body>
<header></header>
<center>
<video id="demoplayer" width="512" height="288" muted controls autoplay></video>
<div id="streamroot-graphs"></div>
</center>
<script>
var hlsjsConfig = {
"maxBufferSize": 0,
"maxBufferLength": 30,
"liveSyncDuration": 30
};
var dnaConfig = {};
var hls = new Hls(hlsjsConfig);
var wrapper = new HlsjsDnaWrapper(hls, "demoswebsiteandpartners", dnaConfig);
var videoElement = document.getElementById('demoplayer');
hls.loadSource('https://demo-vod.streamroot.io/index.m3u8');
hls.attachMedia(videoElement);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
videoElement.play();
});
</script>
</body>
</html>
You can’t perform that action at this time.