Created
August 18, 2014 22:12
-
-
Save iheart2code/a855795d9aacfe23a9e2 to your computer and use it in GitHub Desktop.
Plug.dj Non-crappy UX
This file contains 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
// credit | |
// Most of this is copied from https://github.com/WouterG/PlugDJ-Development/blob/master/Fullscreen-Video.js | |
// source | |
(function(){ | |
function fullVideo() { | |
//select the first element inside '#playback' | |
//and the first element in '#playback-container' | |
$('#playback:first, #playback-container:first') | |
//modify the css in all selected elements at the same time | |
.css("left", "0px") | |
.css("height", "100%") | |
.css("width", "100%"); | |
$('#room:first') | |
.css("width", "100%") | |
.css("background-color", "black"); | |
$('#audience:first, #dj-booth:first, #chat:first').css("display", "none"); | |
} | |
fullVideo(); | |
window.onresize = fullVideo; | |
setInterval(function() { | |
if ($('#playback-container')[0].style.width != '100%') { | |
fullVideo(); | |
} | |
}, 500); | |
})(); | |
// minified | |
(function(){function s(){$("#playback:first, #playback-container:first").css("left","0px").css("height","100%").css("width","100%"),$("#room:first").css("width","100%").css("background-color","black"),$("#audience:first, #dj-booth:first, #chat:first").css("display","none")}s(),window.onresize=s,setInterval(function(){"100%"!=$("#playback-container")[0].style.width&&s()},500)})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment