function toggleFullScreen() {
if (player.requestFullscreen) {
if (document.fullScreenElement) {
document.cancelFullScreen();
} else {
player.requestFullscreen();
}
}
else if (player.msRequestFullscreen) {
if (document.msFullscreenElement) {
document.msExitFullscreen();
} else {
player.msRequestFullscreen();
}
}
else if (player.mozRequestFullScreen) {
if (document.mozFullScreenElement) {
document.mozCancelFullScreen();
} else {
player.mozRequestFullScreen();
}
}
else if (player.webkitRequestFullscreen) {
if (document.webkitFullscreenElement) {
document.webkitCancelFullScreen();
} else {
player.webkitRequestFullscreen();
}
}
else {
alert("Fullscreen API is not supported");
document.getElementById('btnFullScreen').disabled = true;
}
}
var video = document.getElementById('video')