davatron5000/FitVids.js — Issue #29: Accounting for the YouTube control bar
Author: nsteiner
Created: 2012-01-05 20:04:39+00:00
State: open

It seems like an optimization could be made to account for the YouTube control bar. I setup a simplified test to explain what I mean. When you load the page below, there are two videos at 100% width, they both look good it terms of the poster image that shows up, but when you click to play each one you'll see the difference. The top video has controls hidden (controls=0 in the iframe url) and the bottom doesn't. The top video maintains perfect aspect ratio with no letter-boxing, but the bottom one ads letterbox bars on the sides.

http://natesteiner.com/tests/fitvids/

I don't really have the chops to fix this, but hoping there's a way to account for the bar somehow. Pardon in advance if I'm wrong about this and doing something dumb.