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