Skip to content

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

Notifications You must be signed in to change notification settings

jimmyhillis/angular-fitvids

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular FitVids

This project is an AngularJS port of FitVids from @davatron5000 and @chriscoyier. This exists to allow AngularJS users access to responsive video support through FitVids without requiring jQuery.

Browser Support

Has been loosely tests on the latest versions of Chrome and Firefox as well IE8+. Browsers must support document.querySelectorAll for it to work.

Usage

For overall usage please see FitVids. Works with AngularJS v1.2.0 and above.

<script src="/path/to/angular.min.js"></script>
<script src="path/to/angular-fitvids.js"></script>
<script type="text/javascript">
    var App = angular.module('App', ['fitVids']);
</script>

<!-- Video in your <body> -->
<div fit-vids>
    <iframe width="425" height="349" src="http://www.youtube.com/embed/FKWwdQu6_ok" frameborder="0" allowfullscreen></iframe>
</div>

Custom selector support exists like so

<div fit-vids custom-selector="iframe[src^='http://socialcam.com']">
    <iframe width="520px" height="391px" src="http://socialcam.com/videos/XRMP3Y5t/embed?utm_campaign=web&utm_source=embed" frameborder="0" allowfullscreen></iframe>
</div>

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%