WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 5 months ago

#31419 new enhancement

Vimeo and YouTube video cannot be inserted into a playlist

Reported by: Fab1en Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-patch 2nd-opinion
Focuses: Cc:
PR Number:

Description

Now that the video playlist feature is working well in core, it could be great to think about supporting Vimeo and YouTube videos inside playlist.

For the record, YouTube videos can be played with the MediaElementJS player with this shortcode :

[video src="http://youtu.be/_YbVJoMYwJ0"]

I would like to introduce the possibility to play this video inside a playlist:

[playlist type="video" srcs="http://youtu.be/_YbVJoMYwJ0,http://youtu.be/Fn1iMmSvvhQ"]

Now, there are some challenges :

  1. Playlist are managed by selecting attachment form the Media library, along with their meta data (title, poster, ...). How to provide meta data for external videos ?
  2. MediaElementJS does not build the player in the same way when a YouTube video is embeded, so switching between videos does not rely on the same API, and switching between YouTube and mp4 videos is not possible

The first concern could be addressed by registering an attachment post in the database that links to a YouTube URL instead of a video located in the uploads folder.

Change History (3)

#1 @wonderboymusic
5 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

What *could* happen here:

  • Attachment is created with mime-type of video/youtube or video/vimeo
  • oEmbed response is cached in post_meta
  • If thumbnail is available, an attachment is created and linked as featured image to video
  • URL is stored as guid or meta

Then, the playlist could work as per usual, just with the attachment IDs representing these new type of attachments that don't actually produce uploads.

I have not fleshed this out, I have no idea how this will happen.

#2 @iseulde
5 years ago

  • Version trunk deleted

#3 @swissspidy
4 years ago

  • Keywords 2nd-opinion added

While the proposed method sounds pretty doable, I don't really see us implementing something like this in core.

Note: See TracTickets for help on using tickets.