All Projects β†’ rosszurowski β†’ Fitvids

rosszurowski / Fitvids

Licence: wtfpl
Make your video embeds responsive

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Fitvids

React Bps
πŸ”± Create breakpoints to your component props
Stars: ✭ 64 (-32.63%)
Mutual labels:  responsive
Jekyll Cloudinary
Jekyll plugin adding a Liquid tag for Cloudinary, for better responsive images
Stars: ✭ 79 (-16.84%)
Mutual labels:  responsive
React Responsive Picture
A future-proof responsive image component that supports latest Picture specification
Stars: ✭ 91 (-4.21%)
Mutual labels:  responsive
Jquery Calendar
A responsive jquery calendar scheduler built with bootstrap and moment.js
Stars: ✭ 67 (-29.47%)
Mutual labels:  responsive
React Poppop
A mobile support and multi-directional modal for ReactJS
Stars: ✭ 78 (-17.89%)
Mutual labels:  responsive
Infima
A UI framework that provides websites with the minimal CSS and JS needed to get started with building a modern responsive beautiful website
Stars: ✭ 82 (-13.68%)
Mutual labels:  responsive
Responsivedevices.css
Responsive CSS Device frames for your landing pages
Stars: ✭ 59 (-37.89%)
Mutual labels:  responsive
Quasar Apexcharts
πŸ“Š πŸ“ˆ πŸ“‰ Project using Quasar framework and ApexCharts.
Stars: ✭ 94 (-1.05%)
Mutual labels:  responsive
Vue Draggablecal
Not your ordinary datepicker. A Vuejs draggable date selector with a fresh responsive design, mobile ready and 0 dependencies, 17kb gzipped
Stars: ✭ 79 (-16.84%)
Mutual labels:  responsive
Ungrid
ungrid - the simplest responsive css grid
Stars: ✭ 1,292 (+1260%)
Mutual labels:  responsive
Sing App
πŸ’₯Free and open-source admin dashboard template built with Bootstrap 4.5 πŸ’₯
Stars: ✭ 1,187 (+1149.47%)
Mutual labels:  responsive
Easygrid
EasyGrid - VanillaJS Responsive Grid
Stars: ✭ 77 (-18.95%)
Mutual labels:  responsive
Hugo Icon
Icon theme for Hugo
Stars: ✭ 85 (-10.53%)
Mutual labels:  responsive
Iframely
oEmbed proxy. Supports over 1800 domains via custom parsers, oEmbed, Twitter Cards and Open Graph
Stars: ✭ 1,137 (+1096.84%)
Mutual labels:  responsive
Natural Gallery Js
A lazy load, infinite scroll and natural layout list gallery
Stars: ✭ 93 (-2.11%)
Mutual labels:  responsive
Ivory
A modern CSS framework for developing powerful web interfaces faster and easier.
Stars: ✭ 61 (-35.79%)
Mutual labels:  responsive
Paperadmin
A flat admin dashboard using Angular JS 2/4
Stars: ✭ 80 (-15.79%)
Mutual labels:  responsive
React Native Flexbox Grid
Responsive Grid for React Native
Stars: ✭ 95 (+0%)
Mutual labels:  responsive
Match Media
Universal polyfill for match media API using Expo APIs on mobile
Stars: ✭ 95 (+0%)
Mutual labels:  responsive
Vue Responsive
A plugin for responsive handling with vue.js
Stars: ✭ 86 (-9.47%)
Mutual labels:  responsive

fitvids

Lets your videos be responsive by wrapping them in an aspect ratio container.

This module is based heavily off of Dave Rupert's FitVids jQuery plugin.

Install

npm install fitvids --save

You can also download the files manually and include them via a <script> tag.

Usage

fitvids() // Bam, done.

The module exports a single function. Just call it, and it'll wrap video embeds from Youtube, Vimeo, and Kickstarter in a responsive container. Other video players can be supported by passing a custom selector via the options.

To wrap videos that have been added to the page dynamically, just call the function again. Fitvids is smart enough to only wrap the new videos.

Options

Container Selector

To only wrap videos that are a child of an element, you can provide an optional selector:

fitvids('.video-container')

Only videos that are descendants of .video-container will be made responsive.

Custom Players

By default, fitvids automatically wraps Youtube, Vimeo, and Kickstarter players, but if you'd like it to wrap others too, you can pass them in as selectors via the players property.

fitvids({
  players: 'iframe[src*="example.com"]'
})

Or several at once:

fitvids('.video-container', {
  players: ['iframe[src*="example1.com"]', 'iframe[src*="example2.com"]']
})

Ignoring Selectors

If you'd like to ignore certain videos, you can pass a selector via the ignore option:

fitvids({
  ignore: ['object']
})

Browser Support

This module supports every modern browser. It uses ES5 Array methods and querySelector. If you need to use fitvids on a legacy browser, fitvids will work as long as these features are polyfilled.

Contributing

Feel free to make issues or pull requests with bug reports or suggestions.

When contributing code, you can run tests via:

make test

To build distributable versions of the script, run:

make build

License

WTFPL

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].