0
如何在更改視頻後強制克萊普播放器保持全屏顯示? 我編寫的PLAYER_ENDED事件觸發的函數,函數加載下一個視頻與此load
方法:全屏幕不能與克拉普播放器一起工作
enter code here`enter code here`player.load([{source: 'video_url_exmpl'}], null, true);
但是,當觸發事件和新的視頻播放器加載取消全屏模式。我設置選項:
exitFullscreenOnEnd: false,
我寫的假設切換全屏,但瀏覽器拋出一個警告信息插件:
Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture
這裏是我的Clappr播放器初始化和設置:
player = new Clappr.Player({
source: sourceUrl,
parentId: "#player",
autoPlay: true,
width: '100%',
height: '100%',
exitFullscreenOnEnd: false,
playInline: true,
recycleVideo: Clappr.Browser.isMobile,
poster: '',
}).on(Clappr.Events.PLAYER_ENDED, function() {
player.load([{source: 'video_url'}], null, true);
}
});