Skip to content Skip to sidebar Skip to footer

How Can I Catch Event Exitfullscreen Of A Video?

How can I catch event ExitFullScreen of a video ? I need to redraw the page when I exit the FullScreen of tag video.

Solution 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);

Post a Comment for "How Can I Catch Event Exitfullscreen Of A Video?"