2017 © Pedro Peláez
 

component fitvids

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

image

kraksoft/fitvids

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

  • Saturday, January 24, 2015
  • by kraksoft
  • Repository
  • 1 Watchers
  • 0 Stars
  • 717 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1007 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Introducing FitVids.js

A lightweight, easy-to-use jQuery plugin for fluid width video embeds., (*1)

FitVids automates the Intrinsic Ratio Method by Thierry Koblentz to achieve fluid width videos in your responsive web design., (*2)

How Do I Use It?

Include jQuery 1.7+ and FitVids.js in your layout and target your videos container with fitVids()., (*3)

<script src="path/to/jquery.min.js"></script>
<script src="path/to/jquery.fitvids.js"></script>
<script>
  $(document).ready(function(){
    // Target your .container, .wrapper, .post, etc.
    $("#thing-with-videos").fitVids();
  });
</script>

This will wrap each video in a div.fluid-width-video-wrapper and apply the necessary CSS. After the initial Javascript call, it's all percentage-based CSS magic., (*4)

Currently Supported Players

YouTube Y
Vimeo Y
Blip.tv Y
Viddler Y
Kickstarter Y

Add Your Own Video Vendor

Have a custom video player? We now have a customSelector option where you can add your own specific video vendor selector (_mileage may vary depending on vendor and fluidity of player_):, (*5)

  $("#thing-with-videos").fitVids({ customSelector: "iframe[src^='http://mycoolvideosite.com'], iframe[src^='http://myviiids.com']"});
  // Selectors are comma separated, just like CSS

Note: This will be the quickest way to add your own custom vendor as well as test your player's compatibility with FitVids., (*6)

Known issues

  • Vimeo Autoplay API is not compatible with FitVids in IE11. You must manually wrap videos you want to autoplay.

Changelog

  • 08.16.13 - v1.0.3 - 2.779k
    • Optionally works with Zepto
  • 09.02.11 - v1.0.2 - 2.376kb
    • Added customSelector option
  • 09.02.11 - v1.0.0 - 2.135kb
    • Initial release
    • Vimeo,YouTube, Blip.tv, Viddler, Kickstarter

Credits

@ChrisCoyier, @davatron5000, @TrentWalton, @raygunray, (*7)

The Versions

24/01 2015

dev-master

9999999-dev http://fitvidsjs.com/

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

  Sources   Download

MIT

The Requires

 

by Chris Coyier
by Paravel

fitvids

24/01 2015

v1.1.0-patch1

1.1.0.0-patch1 http://fitvidsjs.com/

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

  Sources   Download

MIT

The Requires

 

by Chris Coyier
by Paravel

fitvids

24/01 2015

v1.0.3-patch1

1.0.3.0-patch1 http://fitvidsjs.com/

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

  Sources   Download

MIT

The Requires

 

by Chris Coyier
by Paravel

fitvids

24/01 2015

v1.0.2-patch1

1.0.2.0-patch1 http://fitvidsjs.com/

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

  Sources   Download

MIT

The Requires

 

by Chris Coyier
by Paravel

fitvids

24/01 2015

v1.0.1-patch1

1.0.1.0-patch1 http://fitvidsjs.com/

A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

  Sources   Download

MIT

The Requires

 

by Chris Coyier
by Paravel

fitvids