Skip to content

Instantly share code, notes, and snippets.

@sinkers
Created December 12, 2014 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinkers/73312c474a8e7ece5998 to your computer and use it in GitHub Desktop.
Save sinkers/73312c474a8e7ece5998 to your computer and use it in GitHub Desktop.
Videojs player for live DVR
<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>
@alouane
Copy link

alouane commented Mar 29, 2016

Any solution to this problem?
Using progress bar of a stream media

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment