Created
May 12, 2017 09:34
-
-
Save max-verem/0ad7871093dd3a4aebe314d5a102a836 to your computer and use it in GitHub Desktop.
Dash player sample
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
<!DOCTYPE html> | |
<html><head><meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> | |
<meta http-equiv="content-type" content="text/html;"> | |
<meta name="viewport" content="initial-scale=1.0 maximum-scale=1.0 user-scalable=no"> | |
<title>M2</title> | |
<meta name="description" content="M2" /> | |
<meta name="keywords" content="" /> | |
<meta name="robots" content="index, nofollow" /> | |
<!-- | |
https://github.com/Dash-Industry-Forum/dash.js/wiki | |
http://cdn.dashjs.org/latest/dash.all.min.js | |
--> | |
<script src="dash.all.min.js"></script> | |
<script type="text/javascript"> | |
var interval = setInterval(function() | |
{ | |
if(document.readyState === 'complete') | |
{ | |
clearInterval(interval); | |
var url_mpd = "/dash2/stream.mpd"; | |
var player = dashjs.MediaPlayer().create(); | |
player.initialize(document.querySelector("#player"), url_mpd, true); | |
} | |
}, 100); | |
</script> | |
<style> | |
#wrapper { text-align:center; margin:0 auto; padding:0; width:720px; } | |
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</style> | |
</head><body> | |
<div id="wrapper"> | |
<video id="player" align="center" width="720" height="400" controls></video> | |
</div> | |
</body></html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment