A lightweight jQuery plugin that makes video embeds fluid and responsive using CSS intrinsic ratios.
FitVids.js is a lightweight jQuery plugin that automatically makes embedded videos from platforms like YouTube and Vimeo responsive. It applies the intrinsic ratio method to ensure videos scale fluidly within containers, eliminating manual CSS fixes for different screen sizes.
Frontend developers and web designers building responsive websites who need a simple, reliable solution for fluid video embeds without custom CSS.
Developers choose FitVids.js for its zero-configuration approach, broad player support, and minimal footprint—solving responsive video challenges with just a few lines of jQuery.
A lightweight, easy-to-use jQuery plugin for fluid width video embeds.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Wraps video iframes in a div.fluid-width-video-wrapper to apply the intrinsic ratio method, ensuring responsive scaling with just a JavaScript call, as demonstrated in the minimal setup example.
Supports YouTube, Vimeo, and other platforms out of the box, with a customSelector option to add unsupported vendors, providing flexibility for various embed sources.
Allows exclusion of specific videos using the fitvidsignore class or ignore option, giving developers control over which embeds are affected, as detailed in the README.
Can target video parents for embedded content without predefined containers, enabling handling of client-added videos dynamically, as shown in the example with YouTube iframes.
Requires jQuery 1.7+, adding library overhead and making it unsuitable for projects avoiding jQuery or using modern JavaScript frameworks.
Some out-of-the-box supported players like Blip.tv and Viddler are marked with asterisks indicating potential deprecation, reducing relevance for current video platforms.
Has a known issue with Vimeo Autoplay API not working in IE11, requiring manual wrapping for specific cases, as admitted in the README's known issues section.