【问题标题】:Moodle Videojs Jquery CurrentTimeMoodle Videojs Jquery CurrentTime
【发布时间】: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


    【解决方案1】:

    对于任何想知道的人,我添加了

    &lt;script src="http://vjs.zencdn.net/6.1.0/video.js"&gt;&lt;/script&gt;

    在页脚

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      相关资源
      最近更新 更多