Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#29267 closed enhancement (fixed)

wp_video_shortcode should support vimeo

Reported by: maimairel's profile maimairel Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.9.2
Component: Media Keywords: has-patch
Focuses: Cc:


The latest mediaelementjs (v2.5.1) supports vimeo videos, so wp_video_shortcode should be able to handle this. Currently wp_video_shortcode only looks for youtube videos by checking the URL through regex.

This is a must-add to 4.0!

Attachments (3)

29267.diff (1.2 KB) - added by Tmeister 10 years ago.
29267.2.diff (12.2 KB) - added by wonderboymusic 10 years ago.
29267.3.patch (2.0 KB) - added by dimadin 9 years ago.

Download all attachments as: .zip

Change History (16)

#1 @maimairel
10 years ago

Sorry, I meant v2.15.1 is the latest version of mejs :)

#2 @helen
10 years ago

It is too late for enhancements to 4.0. Perhaps 4.1 with a patch, though.

#3 @maimairel
10 years ago

Actually one line of regex matching should do the job :)

/wp-includes/media.php, line 1718

if ( ! preg_match( $yt_pattern, $src ) || ! preg_match( $vimeo_pattern, $src ) ) {

Well if not I can wait until 4.1.

Thank you!

Last edited 10 years ago by maimairel (previous) (diff)

10 years ago

#4 @Tmeister
10 years ago

  • Keywords 2nd-opinion added

This is a partial patch, this patch add support to Vimeo video source in the video shortcode (wp_video_shortcode).

As you can see in the image attached the video is rendered but the video player has a black bar in the bottom ( video Controls ) .

What is the best way to tackle this? Adding a class to the video tag? see and add the proper css class in the css files to hide the bar?

#5 @wonderboymusic
10 years ago

  • Keywords has-patch needs-refresh added; 2nd-opinion removed
  • Milestone changed from Awaiting Review to Future Release

Vimeo in MEjs requires that Froogaloop is also loaded. When it is, it is breaking jQuery. I have an example patch: 29267.2.diff

#6 @wonderboymusic
9 years ago

  • Keywords needs-refresh removed
  • Milestone changed from Future Release to 4.2

#7 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 31016:

Support chromeless Vimeo via MEjs:

  • Bump MediaElement script loader versions to 2.16.2 - missed in [30634], oops!
  • Add Froogaloop to js/mediaelement scripts for Vimeo
  • Check for Vimeo in the same locations that YouTube is checked
  • Dynamically load Froogaloop script in admin when editing a TinyMCE view
  • Edit MediaElement to call mejs.$.extend instead of $.extend in mejs.HtmlMediaElementShim.createPlugin(), since $ is not available via WP's jQuery (I will report this upstream):

Fixes #29267.

#9 @dimadin
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

You missed to add froogaloop.min.js. I got one from (with first line removed) so I'm unsure if that is the same version.

9 years ago

#10 @wonderboymusic
9 years ago

Thanks @dimadin - that was an svn miss on my part, I'll add it soon

#11 @SergeyBiryukov
9 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

[31115] missed the ticket.

#12 @wonderboymusic
9 years ago

In 31487:

Restore the changes I made in [31016] for chromeless Vimeo that were missed in [31373].

Make sure that the build file for grid doesn't load views/media-details.js, it already exists in the audio-video build.

See #29267, #28510.

#13 @wonderboymusic
9 years ago

In 31625:

When editing/viewing the details of a [video] shortcode that has Vimeo as its source, and Froogaloop has not already been lazy-loaded, check the details of the state's model for the video src, instead of the HTML element.

See #29267.

Note: See TracTickets for help on using tickets.