Created
March 27, 2017 15:49
-
-
Save nadavkav/99d258c3b8841943d590af694f9455b7 to your computer and use it in GitHub Desktop.
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
<?php | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="icon" href="favicon.ico"> | |
<title>your-domain VOD player</title> | |
<!-- Bootstrap core CSS. This is just to make the demo look | |
nice. It's not required for videojs-contrib-dash to work. --> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | |
<!-- Some custom styles for the demo page --> | |
<style> | |
body { | |
padding-top: 50px; | |
color: #868688; | |
background-color: #FAFCFF; | |
} | |
nav { | |
background-color: #e7e7e7 | |
} | |
nav a { | |
color: #868688; | |
} | |
nav a:hover { | |
color: #606062; | |
text-decoration: none; | |
} | |
.navbar-nav { | |
float: right; | |
} | |
.navbar-toggle .icon-bar { | |
background-color: #868688; | |
} | |
.starter-template { | |
padding: 40px 15px; | |
text-align: center; | |
} | |
.video-js { | |
margin: 0 auto; | |
} | |
</style> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<nav class="navbar navbar-fixed-top"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
<span class="sr-only">Toggle navigation</span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="#">your-domain video player</a> | |
</div> | |
<div id="navbar" class="collapse navbar-collapse"> | |
<ul class="nav navbar-nav"> | |
<li><a href="https://www.your-domain.ac.il">Campus</a></li> | |
</ul> | |
</div><!--/.nav-collapse --> | |
</div> | |
</nav> | |
<div class="container"> | |
<section class="starter-template"> | |
<h1>your-domain VOD media player</h1> | |
<p class="lead"> | |
</p> | |
<!-- | |
-- Your video element. Just like regular HTML5 video. | |
--> | |
<video id=your-domain-vod-video width=600 height=300 class="video-js vjs-default-skin" controls> | |
</video> | |
</section> | |
</div><!-- /.container --> | |
<!-- Bootstrap stuff. These three scripts aren't necessary for you | |
to use videojs-contrib-dash --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<!-------------------------------------------------------------------------- | |
-- videojs-contrib-dash setup -- | |
------------------------------------------------------------------------!> | |
<!-- | |
-- Make sure to include the video.js CSS. This could go in | |
-- the <head>, too. | |
--> | |
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet"> | |
<!-- | |
-- Include video.js, dash.js, and | |
-- videojs-contrib-dash in your page | |
--> | |
<script src="https://unpkg.com/video.js/dist/video.min.js"></script> | |
<script src="//cdn.dashjs.org/latest/dash.all.min.js"></script> | |
<script src="https://unpkg.com/videojs-contrib-dash/dist/videojs-dash.min.js"></script> | |
<!-- | |
-- Now, initialize your player. That's it! | |
--> | |
<script> | |
var player = videojs('your-domain-vod-video'); | |
player.src({ | |
//https://vod.your-domain.ac.il/vod/2016/09/00739adf0f2032d1ef6848e71d4586f8.mp4 | |
src: 'https://vod.your-domain.ac.il/vod/<?php echo $_GET['your-domain-vod-file'] ?>.mp4/manifest.mpd', | |
type: 'application/dash+xml' | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment