var videoElement = document.getElementById("video");
function toggleFullScreen() {
if (!document.fullscreenElement && // alternative standard method
!document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
}
if(videoElement == toggleFullScreen){
document.body.style.display = ('none');
}
function toggleFullScreen() {
if (!document.fullscreenElement && // alternative standard method
!document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
return true
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
return false
}
}
toggleFullScreen() && document.body.style.display = ('none');
function toggleFullScreen() {
if (!document.fullscreenElement && // alternative standard method
!document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen() && return true;
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen() && return true;
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) && return true;
}
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen() && return false;
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen() && return false;
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen() && return false
}
}
}
toggleFullScreen() && document.body.style.display = ('none');
;(function(window, document) {
const foreach = function(a, b) {
for( let i = 0; i < b.length; i++ ) if( void 0 !== a[b[i]] ) {
a[b[i]](); break;
}
};
window['Fullscreen'] = {
launch : function(a) {
foreach(a || document.documentElement, [
"requestFullscreen", "webkitRequestFullscreen", "mozRequestFullScreen", "msRequestFullscreen"
]);
},
cancel : function(a) {
foreach(a || document, [
"exitFullscreen", "webkitExitFullscreen", "mozCancelFullScreen", "msExitFullscreen"
]);
},
check : function() {
return Boolean(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement);
}
};
})(window, document);
document.body.style.display = Fullscreen.check() ? 'none' : 'block';