Created
November 27, 2014 07:18
-
-
Save user19/e578137a4299d56ab32c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var player = document.getElementById("player"); | |
player.addEventListener("click", function(event){ | |
style = window.document.createElement("style"); | |
style.innerHTML = "iframe{width:"+window.parent.screen.width+"px;height:"+Math.floor(window.parent.screen.width*9/16)+"px;}"; | |
window.document.getElementById("main").appendChild(style); | |
if (player.webkitRequestFullScreen) | |
player.webkitRequestFullScreen(); | |
else if(player.mozRequestFullScreen) | |
player.mozRequestFullScreen(); | |
else if(player.msRequestFullscreen) | |
player.msRequestFullscreen(); | |
else if(player.requestFullScreen) | |
player.requestFullScreen(); | |
else | |
return false; | |
},false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment