我测试了下面的JavaScript代码,以检测HTML5视频是否全屏显示。该代码在Chrome,Firefox和Opera中运行良好,但在IE中则不然。如何在Internet Explorer中使用它?我尝试了“document.msFullscreenElement”,但是没有用。
if( document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.oFullscreenElement)
mode = "FULLSCREENVIDEO";
else
mode = "REGULAR";