WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#28622 closed feature request (wontfix)

Add a filter for video shortcode pattern

Reported by: jmlapam Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Shortcodes Keywords:
Focuses: Cc:

Description

Hi for now it's possible with WP 3.9.1 to add a shortcode to embed video or audio content without iFrame and it's cleaner. It's also responsive which allowds us to skip the use of additional scripts such as fitvidjs.

The only thing is that it's made for self hosted videos and YouTube but other providers are not taken into account.

That would be a great enhancement if you add a filter at this line : https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-includes/media.php#L1714

Something you might combine with actual list of oEmbed providers.

Is that possible? Why is it just YouTube? Maybe there's a good reason I don't know. Hopefully I get a 'yes' on this

Change History (3)

#1 @aaroncampbell
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

As for why we treat YouTube special in this case, it's because we use MediaElement.js and they have special support for YouTube. My understanding is that they only have special support like that for YouTube, so it wouldn't make sense to allow that code to match anything else.

Having said all that, if you need to do something that the video shortcode doesn't do, you can use the wp_video_shortcode_override filter to completely shortcut it and do anything you want with it.

#2 @Fab1en
7 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

MediaElement.js DOES support other providers : Vimeo is supported since version 2.14.0 (WordPress version 3.9). I have also submitted a pull request to support Dailymotion, but it has not been merged yet.

Using wp_video_shortcode_override filter is a solution that duplicates a lot of WordPress Core code inside a plugin, just to change one or two lines.

#3 @wonderboymusic
7 years ago

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

I already attempted to add Vimeo here:
https://core.trac.wordpress.org/attachment/ticket/29267/29267.2.diff

Long story short: it doesn't really work. I am not going to add a filter there, it will just produce bug reports for things we have no control over. If an elegant solution for adding Vimeo via Froogaloop emerges, we'll probably add it.

Note: See TracTickets for help on using tickets.