function _fullscr(e){ var element = document.webkitFullscreenElement || document.mozFullScreenElement || document.mozFullscreenElement || document.fullscreenElement || null; console.log("fullscreen..... w:" + window.innerWidth + " e:" + e.target + " elm:" + element); if (!svManager.getInstance()){ if (element){ $id("width").value = window.innerWidth; $id("height").value = window.innerHeight; } connectRDP(); } } function connectFullscr(){ var enabled = document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.fullscreenEnabled || false; if (enabled){//has fullscreen support var b = document.body; if (b.webkitRequestFullScreen){ b.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); }else if (b.mozRequestFullScreen){ b.mozRequestFullScreen(); }else if (b.requestFullscreen){ b.requestFullscreen(); } document.addEventListener("fullscreenchange", _fullscr); document.addEventListener("webkitfullscreenchange", _fullscr); document.addEventListener("mozfullscreenchange", _fullscr); document.addEventListener("fullscreenchange", _fullscr); }else{ connectRDP();//no fullscreen support, start it directly } return false; }
Category:
SparkView