如何捕获视频的事件ExitFullScreen?

时间:2012-07-13 13:54:35

标签: javascript html5 webkit android-browser

如何捕获视频的事件ExitFullScreen? 退出标签视频的全屏时,我需要重新绘制页面。

1 个答案:

答案 0 :(得分:6)

收听fullscreenchange事件:

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