This commit is contained in:
calzoneman 2014-11-16 11:19:14 -06:00
parent 2f9b5ffe6a
commit 610fd5a7c3
1 changed files with 5 additions and 4 deletions

View File

@ -1657,15 +1657,16 @@ function handleVideoResize() {
var intv, ticks = 0;
var resize = function () {
if (++ticks > 10) clearInterval(intv);
if ($("#ytapiplayer").height() === 0) return;
if ($("#ytapiplayer").parent().height() === 0) return;
clearInterval(intv);
var height = $("#ytapiplayer").height() - $("#chatline").outerHeight() - 2;
var responsiveFrame = $("#ytapiplayer").parent();
var height = responsiveFrame.outerHeight() - $("#chatline").outerHeight() - 2;
$("#messagebuffer").height(height);
$("#userlist").height(height);
$("#ytapiplayer").attr("height", VHEIGHT = $("#ytapiplayer").height());
$("#ytapiplayer").attr("width", VWIDTH = $("#ytapiplayer").width());
$("#ytapiplayer").attr("height", VHEIGHT = responsiveFrame.outerHeight());
$("#ytapiplayer").attr("width", VWIDTH = responsiveFrame.outerWidth());
};
if ($("#ytapiplayer").height() > 0) resize();