finds.dev

toddmotto/fluidvids

Fluid width (responsive) videos module, 1KB, custom players, dynamic elements/XHR support.

View on GitHubHomepage ↗

★ 415JavaScriptNOASSERTIONupdated Aug 2022

// the take

A 1KB JavaScript module that wraps iframe embeds in an intrinsic-ratio container so YouTube/Vimeo videos scale responsively. Solves a real problem that predates native CSS solutions. Last touched in 2022, and the problem it solved is now mostly handled by `aspect-ratio: 16/9` in CSS.

Tiny and self-contained — no dependencies, one init call and you're done. The `render()` method for dynamically injected iframes is a thoughtful addition that most CSS-only approaches miss. Domain whitelist via regex means it won't accidentally wrap every iframe on a page. Jasmine test suite exists and covers the main logic.

The CSS `aspect-ratio` property is now baseline-available across all modern browsers, which makes this library unnecessary for any project not targeting IE. Last commit was 2022 and the repo shows no signs of life — you'd be adopting abandoned code. The `require('fluidvids.js')()` module pattern (called as a function) is an odd API that will confuse anyone used to standard ESM or CJS. Bower installation instructions are still in the README, which dates it badly.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
415
Forks
70
Language
JavaScript
License
NOASSERTION
Last commit
11 Aug 2022

// nearby

If fluidvids isn't quite it.

All repos →