Tacoen's shared code-snipsets
var sw=$(window).width(); var sh=$(window).height(); var sm = sw*0.02; var pw = sw-sm; // add more variable to make it fit var pr = 9/16; // 16:9 - video size var pp = 16; // holder padding // Player-holder size $('#player-holder').width(pw); $('#player-holder').height(pr*pw); $('#player-holder').css('padding',pp); // Player size $('#player').width(pw-(2*pp)); $('#player').height((pr*pw)-(2*pp));
Label: jquery