From: Vincent Vanwaelscappel Date: Tue, 28 Oct 2014 13:54:38 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=db4f9590228b6e334e8610feea2058b99a129689;p=fluidbook-html5.git --- diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 40a1deb5..ca3c138e 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -187,16 +187,21 @@ FluidbookResize.prototype = { resizePopupVideos: function () { var maxh = this.hh - 80; $(".mview .videoContainer video").each(function () { - var w = $(window).width() - 40; + var maxw = $(window).width() - 40; var ratio = parseInt($(this).attr('data-width')) / parseInt($(this).attr('data-height')); var h = w / ratio; if (isNaN(h)) { h = maxh; } + if (isNaN(w)) { + w = maxw; + } $(this).css({ height: h, - maxHeight: maxh + width: w, + maxHeight: maxh, + maxWidth: maxw, }); }); },