Last active
December 6, 2017 21:42
-
-
Save brutaldesign/9774304 to your computer and use it in GitHub Desktop.
Fluid Video JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( function( $ ) { | |
var videoSelectors = [ | |
'iframe[src*="player.vimeo.com"]', | |
'iframe[src*="youtube.com"]', | |
'iframe[src*="youtube-nocookie.com"]', | |
'iframe[src*="kickstarter.com"][src*="video.html"]', | |
'iframe[src*="screenr.com"]', | |
'iframe[src*="blip.tv"]', | |
'iframe[src*="dailymotion.com"]', | |
'iframe[src*="viddler.com"]', | |
'iframe[src*="qik.com"]', | |
'iframe[src*="revision3.com"]', | |
'iframe[src*="hulu.com"]', | |
'iframe[src*="funnyordie.com"]', | |
'iframe[src*="flickr.com"]', | |
'embed[src*="v.wordpress.com"]' | |
// add more selectors here | |
]; | |
var allVideos = videoSelectors.join( ',' ); | |
$( allVideos ).wrap( '<span class="fluid-video" />' ); // wrap them all! | |
} ) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment