Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <title>Test Video.js</title>
- <link href="video-js.min.css" rel="stylesheet">
- <script src="video.min.js"></script>
- </head>
- <body>
- <div id="testdiv"></div>
- <video id="myvideo" class="video-js vjs-default-skin" width="640" height="480%" poster="RTSjrfnBIog.jpg" data-setup='{}'>
- <source src="testvideo.mp4" type='video/mp4'>
- </video>
- <script>
- var options = {controls: 0};
- var player = videojs('myvideo', options, function onPlayerReady() {
- videojs.log('Your player is ready!');
- var date = new Date();
- var today = new Date();
- today.setHours(2, 53, 40, 0);
- var w_hour = date.getHours();
- var timee = today.getTime();
- var time_offset = (date - today)/1000
- videojs.log( time_offset + " sec" );
- if (time_offset > 0) {
- player.currentTime(time_offset);
- player.play();
- }
- this.on('ended', function() {
- videojs.log('Awww...over so soon?!');
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement