Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fluid Video JS
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
You can’t perform that action at this time.