我目前正在为video.js构建一个插件,在某些断点处呈现覆盖屏幕。但是,如果不启动视频,我无法点击任何叠加层。我想我需要禁用播放器上的点击播放功能。禁用/启用点击播放功能
我应该如何去禁用/启用video.js播放器的点击播放功能?
function createBreak(breakpoint){
player.pause();//pause the playback
player.getChild('controlBar').hide();//hide the controlbar
breakpoint.resolved = true;//
var button = createEl('button',{});//adds button to video.js parent <div>
button.innerHTML = "continue";//
//THE PROBLEM: this button cannot be clicked (this is just a proof of concept)
// because clicking on it will restart the player
//WHAT I NEED: a function that can disable the click-to-play
}
This solution已经存在,但它似乎只在旧版本的Video.js
请将您遇到问题的代码添加到问题中。这将帮助你获得更好的答案。 – baao
我对我正在使用的代码没有任何具体问题,但我会发布上下文 – Rgw3d