記錄一下HTML5 中Video 全屏監聽,退出全屏事件方法

最近作視頻播放的時候,要求退出全屏的時候,視頻能夠繼續播放不暫停,找了一個比較好用的js方法,記錄一下
 
function checkFull(){     var isFull = document.fullscreenEnabled || window.fullScreen || document.webkitIsFullScreen || document.msFullscreenEnabled;     if(isFull === undefined) isFull = false;     return isFull; }
$(window).resize(
function () {     if (!checkFull()) {       console.log("退出全屏");     } });

 

做者:itcongweb

連接:https://www.jianshu.com/p/f94da7808afd

spa

相關文章
相關標籤/搜索