【发布时间】:2017-06-22 19:59:44
【问题描述】:
您好,我一直在尝试更改 videojs 播放器的时间。我阅读了我想使用的http://docs.videojs.com/docs/api/player.html
// 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
【问题讨论】:
标签: javascript jquery javascript-objects moodle video.js