0

Is there a way when you hide controls and still be able to pause / play video ? I've seen that when controls are visible the player works fine and reported no other problem.

I tried to find an answer on docs but no luck. So is there a way to do this ?

Many thanks and great work here!

4

1 回答 1

0

Video.js 的工作方式类似于 html5 视频视频元素,如果您关闭控件,则控制视频的唯一方法是通过 API。设置我认为您正在谈论的内容的最简单方法是执行以下操作。

videojs('my_video_id').on('click', function(){
  如果 (this.paused()) {
    this.play();
  } 别的 {
    this.pause();
  }
});
于 2013-10-31T23:00:51.937 回答