How can I catch event ExitFullScreen of a video ? I need to redraw the page when I exit the FullScreen of tag video.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Listen to the fullscreenchange
event:
document.addEventListener("fullscreenchange", function () {
console.log(document.fullscreen);
}, false);
document.addEventListener("mozfullscreenchange", function () {
console.log(document.mozFullScreen);
}, false);
document.addEventListener("webkitfullscreenchange", function () {
console.log(document.webkitIsFullScreen);
}, false);