Fluid Video Embeds

Fluid Video Embeds

By jamie3d

This plugin modifies the built-in Vimeo and YouTube oEmbed auto-embeds so they are full-width, and flexible while maintaining their original aspect ratio.

As of version 1.2.2 it contains English, Portuguese (BR), and Spanish translations.

See a live demo here: Fluid Video Embeds Demo

Requirements: PHP5+, WordPress 3.3+

Usage: Install the plugin, activate it, then your YouTube and Vimeo embeds should start to ignore the setting in Settings > Media > Maximum embed size You don’t need to use embed code or a shortcode, you can simply paste the YouTube or Vimeo URL into your post and it should work.

You can also use the [fve] shortcode:

[fve]http://youtu.be/oHg5SJYRHA0[/fve]

If you want to use the Fluid Video Embeds method in a php template file in your theme, you can use the do_shortcode method:

<?php echo do_shortcode('[fve]http://youtu.be/oHg5SJYRHA0[/fve]'); ?>

You can filter the YouTube and or Vimeo URLs like this if you want to customize them (like explicitly specifying the https scheme):

// Filter the iframe URL for Vimeo
add_filter( 'fve_vimeo_iframe_url', 'fve_vimeo_iframe_url', 10, 2 );
function fve_vimeo_iframe_url( $vimeo_iframe_url, $video_meta ) {
  return 'https://player.vimeo.com/video/' . $video_meta['id'] . '?portrait=0&byline=0&title=0';
}

Check the source to see all of the filters by searching for apply_filters(

How It Works

The Fluid Video Embeds plugin aims to cleanly display YouTube and Vimeo videos while allowing them to be fluid(elastic/felxible) as well. The technique for doing this is not very new (and is outlined in the credits links below), however I’ve added a bit of “sugar” to the mix. Since Vimeo and YouTube have robust, open APIs, I’m requesting information about each video server side (which is then cached) and used to determine the optimal aspect ratio for the video container.

Credits

  1. Upload the fluid-video-embeds folder and all its contents to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. ???
  4. Enjoy/Profit.

Installation Instructions

  1. Upload the fluid-video-embeds folder and all its contents to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. ???
  4. Enjoy/Profit.

Why does the plugin only support YouTube and Vimeo?

I believe that these are the two most popular video platforms (for my current audience) and I coded them first because I am the most familiar with them.
I am not opposed to adding video-provider X if their API allows me to.

Why do you need to make API calls?

You can’t get the video dimensions (and thus aspect ratio) without doing some sloppy JavaScript (maybe) or making an API call. The only thing that makes this plugin special is that fact that it attempts to remove black bars from your video, thus necessitating API calls. The API requests are cached however, so it should only have a minimal impact.

1.2.9

  • You can now filter the video URLs and permalinks with fve_youtube_iframe_url, fve_youtube_permalink, etc.

1.2.8

  • Updating translation text domain
  • Updating translations for es_ES and pt_BR

1.2.7

  • Added https:// to certain endpoint and asset URLs in the plugin (better https support).
  • Added 16:9 override for Vimeo videos. (It seems some servers are unable to reach Vimeo’s API).
  • Added option to disable CSS output. This was breaking minification for some users. There is now an accompanying URL that shows the generated CSS for manual inclusion into the theme if desired.

1.2.6

  • Removes the scheme (http://) from the iframe URLs for better https:// support. Thanks to NicholasCook for the fix.

1.2.5

  • Adds an editor stylesheet for TinyMCE

1.2.4

  • Fixes a few PHP notices due to empty API results.
  • Adds a new YouTube option that allows you to force the 16:9 ratio.

1.2.3

  • Upgraded to version 3 of the YouTube API.
  • Fixes a previous issue that was introduced around version 1.0.3 when the YouTube version 2 API became unreliable.

1.2.2

  • Added Portuguese translation thanks to Eduardo http://www.linkedin.com/in/eduardotoledano
  • Added a max-width to the settings page.

1.2.1

  • Added full i18n (internationalization) support.
  • Added Spanish translation thanks to Andrew at http://www.webhostinghub.com/

1.2.0

  • Added a max-width option to the new settings screen.
  • Now has an alignment option if the max-width option is used.
  • New hyperlink mode for mobile devices with a customizable media query.

1.1.1

Changed the way that YouTube widescreen videos are determined. It looks like they changed an API without letting us know.

1.1.0

Adding a [fve] shortcode for use in your theme like this: <?php echo do_shortcode('[fve]http://www.youtube.com/watch?v=oHg5SJYRHA0[/fve]'); ?>

1.0.3

Fixing an error (Warning/Notice) that was being thrown if the YouTube API did not return an aspect ratio property.

1.0.2

Adding a feed detection function that reverts to the default functionality for oEmbeds if the post is being viewed in a feed.

1.0.1

Added wmode=transparent& to the YouTube embed URL. This prevents YouTube videos from covering things like lightboxes and other overlapping content.

1.0

Initial release

Version
1.2.9
Last Update
8 years ago
Download
94,318+
Tested up to:
4.7.13
Categories:
General

Screenshots

Alternative Plugins for Fluid Video Embeds

Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.

Categories: General

Makes video thumbnails, allows resolution switching, and embeds responsive self-hosted videos and galleries.

Categories: General

A collection of sidebar widgets for displaying Flash Videos from 14 video sharing networks.

Categories: General

Video.js – HTML5 Video Player for WordPress

By Dustin Lammiman, Steve Heffernan

Self-hosted responsive HTML5 video for WordPress, built on the widely used Video.js HTML5 video player. Embed video in your post or page using HTML5.

Categories: General

Video Player - Inserting video player on a page is a perfect way to supplement&hellip;

Categories: General

Make your &quot;auto embedded&quot; YouTube and Vimeo videos full width (100%) while maintaining their original aspect ratio

Categories: General

Fluid Responsive Slideshow is an easy to use slideshow. It&#039;s responsive, dummyproof and powered with 50+ beautiful skins.

Categories: General

Easily assign a video background to any element on your WordPress pages or posts. Now compatible with WPBakery (Visual Composer) and SiteOrigin Page B &hellip;

Categories: General

Add self-hosted background videos to your SiteOrigin Page Builder rows, with optional coloured or patterned overlays. Built and maintained by BG Stock &hellip;

Categories: General

Discover the Lists with Fluid Video Embeds

fischeritalia

By simone

namaroopa before migrate

By lifeofaclickwpfav

vol intsall

By vane vrb

startup

By Vitor Francisco Freitas dos Santos

marketing digital inicial

Credit Platform

By Elliot Gerchak

exp

By kan imai

FarrowSystem.EU - ALL Plugins

By Andreas Tyrosvoutis

A save of all the plugins from when it was migrated from multisite. Just for historical purposes.

OS WooCommerce Plugins New Install

By Brett Walling

My list of plugins I use for WooCommerce sites.