2017-06-22 51 views
0

嗨我被困在试图改变videojs播放器的时间。我在http://docs.videojs.com/docs/api/player.html上看到我想要使用Moodle Videojs Jquery CurrentTime

// set 
myPlayer.currentTime(120); // 2 minutes into the video 

设置视频播放器的时间。我的代码是:

var myPlayer = videojs('id_videojs_594c152bdf2e0_html5_api'); 
// set current time to 2 minutes into the video 
myPlayer.currentTime(120); 
myPlayer.play(); 

我的HTML是

<video id="id_videojs_594c152bdf2e0_html5_api" class="vjs-tech" title="x.m4v" tabindex="-1"> <source src="http://x/videos/x.m4v" type="video/mp4">http://x/videos/x.m4v </video>

我的错误是

Uncaught ReferenceError: videojs is not defined 
**var myPlayer = videojs('#id_videojs_594c152bdf2e0_html5_api');** this line 

回答

0

大家很奇怪,我说

<script src="http://vjs.zencdn.net/6.1.0/video.js"></script>

在页脚