Export to GitHub

jquery-tubular - issue #1

Known issue: extra space on sides


Posted on Nov 21, 2010 by Grumpy Rabbit

What steps will reproduce the problem? 1. Loading the plugin properly

What is the expected output? What do you see instead? The video should be tight to the browser chrome but there is some extra space, probably from the use of $().width(). I'll figure this out when I get a chance.

Comment #1

Posted on Mar 8, 2011 by Quick Giraffe

Comment deleted

Comment #2

Posted on Mar 8, 2011 by Quick Giraffe

var videoRatio = 16/9.27;

works for me

Comment #3

Posted on May 27, 2011 by Grumpy Rabbit

Update: 2011-05-26 -- I haven't worked on this project for some months. Will try to work this out soon. Thanks for the suggestion, krishmaratalata.

Comment #4

Posted on Nov 3, 2011 by Helpful Rhino

Yeah, I've found that too!

I got it to flush against the sides. Go to the tubular jquery folder. Find this section near the bottom.

function resizePlayer() { var newWidth = jQuery(window).width() + 40; // original page width var newHeight = jQuery(window).height(); // original page height

..... etc

Change var newWidth = jQuery(window).width(); // original page width To var newWidth = jQuery(window).width() + 40; // original page width

And add css to your style file:

myytplayer {

margin-left:-20px;  

}

Comment #5

Posted on Jan 19, 2012 by Grumpy Camel

bump on comment #4 worked for me.

Comment #6

Posted on Feb 5, 2012 by Massive Ox

The +40 addition from comment 4 helped make it better. But the #myytplayer addition is supposed to go into the screen.css file, or?

Comment #7

Posted on Apr 22, 2012 by Massive Monkey

I would go so far as to add +50 to both height and width, that hides the video controls and bars on the sides. Then add margin-left -25px to your stylesheet. (No real need to add the top margin).

To comment 6: add it to your styleesheet

Comment #8

Posted on Oct 1, 2012 by Grumpy Rabbit

The new version allows you to specify your own aspect ratio. It defaults to 16/9, but many videos are not exactly 16/9 so you can tweak to get the dimensions exactly right. When calling .tubular() pass ratio: 16/9 or 16.5/9 or whatever you need to get the proper ratio. .tubular() accepts options as a single object. for example:

$('#wrapper').tubular({videoID: '12345', ratio: 4/3});

Hope this helps!

Status: Fixed

Labels:
Type-Defect Priority-Medium