davatron5000/FitVids.js — pull request #104 by thruflo (2013-03-24 15:46:54+00:00)
Title: Introduce a `maxAspectRatio` option to limit the height of the embedded video.

Allows the aspect ratio of the embedded video to be limited. For example,
if using:

$('.selector').fitVids({'maxAspectRatio': 0.5625});

Embedded videos encoded at aspect ratios "squarer" than 16x9 will be vertically
letterboxed, i.e.: displayed centred in the `.fluid-width-video-wrapper` with
black edges down the side.

My use case for this is a responsive gallery unit where I want images and videos to display at the same size (without having control of the videos that are displayed in it). Without this option, fitvids embeds the videos at the width of the container x the native aspect ratio of the video. So 4x3 videos are much deeper than 16x9 videos. With this option, I can constrain the 4x3 videos to display (centred, vertically letterboxed) within a 16x9 container.