diff --git a/static/css/style.css b/static/css/style.css index a4fb34e..e5a0ff8 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -45,7 +45,7 @@ main { .fullscreen { height: 100vh !important; overflow: none !important; - margin: 0 !important; + margin: auto !important; padding: 0 !important; width 100%; border: none !important; diff --git a/static/js/index.js b/static/js/index.js index 2ee5e12..c11e200 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -44,8 +44,9 @@ function showAppsPushed() { function showAppsMode() { document.getElementById('streamSettings').style.display = 'none'; - document.getElementById('hostSettings').style.display = 'none' - document.getElementById('gameSelection').style.display = 'inline-block' + document.getElementById('hostSettings').style.display = 'none'; + document.getElementById('gameSelection').style.display = 'inline-block'; + document.body.style.backgroundColor = "black"; // common.hideModule(); // do NOT hide the nacl module. you can't interact with it then } @@ -70,6 +71,7 @@ function playGameMode() { $("#main-content").addClass("fullscreen"); $("#listener").addClass("fullscreen"); fullscreenNaclModule(); + document.body.style.backgroundColor = "black"; } function fullscreenNaclModule() { @@ -83,9 +85,10 @@ function fullscreenNaclModule() { var zoom = Math.min(xRatio, yRatio); - var body = document.getElementById("nacl_module"); - body.width=zoom * streamWidth; - body.height=zoom * streamHeight; + var module = document.getElementById("nacl_module"); + module.width=zoom * streamWidth; + module.height=zoom * streamHeight; + module.style.paddingTop = ((screenHeight - module.height) / 2) + "px"; } // user pushed the stop button. we should stop.