function inFullScreen(element) {
var ele = element;
if (ele.requestFullscreen) {
ele.requestFullscreen();
} else if (ele.mozRequestFullScreen) {
ele.mozRequestFullScreen();
} else if (ele.webkitRequestFullscreen) {
ele.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
} else if (ele.msRequestFullscreen) {
ele.msRequestFullscreen();
} else {
console.log("request Fullscreen API is not supported");
}
}
function outFullScreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else {
console.log("exit Fullscreen API is not supported");
}
}
function isFullScreen() {
if (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)
return true;
else
return false;
}