HTML5 Video 全屏监听esc退出全屏事件方法

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("退出全屏");
}
});

你可能感兴趣的:(HTML5 Video 全屏监听esc退出全屏事件方法)