2
有沒有辦法在運行時顯示/隱藏videojs播放器上的視頻控件(例如player.controls.hide())。
任何想法如何做到這一點? 謝謝!運行時顯示/隱藏Videojs控件
有沒有辦法在運行時顯示/隱藏videojs播放器上的視頻控件(例如player.controls.hide())。
任何想法如何做到這一點? 謝謝!運行時顯示/隱藏Videojs控件
這是我如何在1秒的鼠標無操作超時後隱藏控件。
var inactivityTimeout = null;
$('#vmr_video').mousemove(function(event) {
player.controlBar.fadeIn();
if (inactivityTimeout != null) {
clearTimeout(inactivityTimeout);
}
inactivityTimeout = setTimeout(function(){
player.controlBar.fadeOut();
controlBarVisible = false;
}, 1000);
});
使用player.userActive(false)
隱藏控件。您還可以收聽播放器上的useractive
和userinactive`事件,以響應播放器自然顯示和隱藏控件。