Created
December 12, 2014 03:54
-
-
Save sinkers/73312c474a8e7ece5998 to your computer and use it in GitHub Desktop.
Videojs player for live DVR
This file contains 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
<link href="http://vjs.zencdn.net/4.10/video-js.css" rel="stylesheet"> | |
<script src="http://vjs.zencdn.net/4.10/video.js"></script> | |
<script src="videojs-media-sources.js"></script> | |
<script src="videojs.hls.js"></script> | |
<script> | |
</script> | |
<script> | |
videojs.options.flash.swf = "video-js-swf/dist/video-js.swf"; | |
//{"techOrder": ["flash"]} | |
</script> | |
<video controls id="video1" | |
class="video-js vjs-default-skin" | |
width="960" height="540" | |
data-setup=''> | |
<source src="http://localhost/temp/recordtest/index.m3u8" type="application/x-mpegURL"> | |
</video> | |
<script> | |
videojs("video1").ready(function(){ | |
var myPlayer = this; | |
console.log("vjs Ready"); | |
// EXAMPLE: Start playing the video. | |
myPlayer.duration(600); | |
myPlayer.removeClass('vjs-live'); | |
myPlayer.play(); | |
}); | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any solution to this problem?
Using progress bar of a stream media