Skip to content
Snippets Groups Projects
Commit 300f9156 authored by Florian Gnägi's avatar Florian Gnägi
Browse files

OO-4764 resize nanoo.tv frame only when outer element has a dimension

parent 22743bf3
No related branches found
No related tags found
No related merge requests found
......@@ -199,7 +199,8 @@ var BPlayer = {
var containerWidth = jQuery(parentContainer).width();
var originalWidth = config.width;
var originalHeight = config.height;
if(containerWidth < originalWidth) {
// If container width is available and smaller, resize to fit container
if(containerWidth && containerWidth < originalWidth) {
var ratio = originalHeight / originalWidth;
var tw = containerWidth;
var th = ((containerWidth * ratio)|0);
......@@ -210,7 +211,7 @@ var BPlayer = {
jQuery(window).resize(function() {
var container = jQuery('#' + domId).parent("p , div");
var cWidth = jQuery(container).width();
if(cWidth < originalWidth) {
if(cWidth && cWidth < originalWidth) {
var ratio = originalHeight / originalWidth;
var tw = cWidth;
var th = ((cWidth * ratio)|0);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment