嗨,我卡住了,试图改变视频播放器的时间。我在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发布于 2017-06-24 03:19:53
对于任何想知道的人,我补充说
<script src="http://vjs.zencdn.net/6.1.0/video.js"></script>
在页脚中
https://stackoverflow.com/questions/44708350
复制相似问题