Make WordPress Core

Opened 7 years ago

Last modified 6 years ago

#42074 new defect (bug)

YouTube Auto-Embed Does Not Work with Video+Playlist Links

Reported by: microberto's profile MicroBerto Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Embeds Keywords: needs-patch
Focuses: Cc:



When we past a video URL into the editor, it works fine:

But when embedding the playlist-based URL, WordPress always shows the first video in the playlist, despite the v=0yGrCbYDUvQ being set (see below what I am pasting). This is even if I don't have their index parameter set (indexes can move around):

To make it work, I always have to use YouTube's physical embed code, but then I don't get the benefits of WordPress auto-sizing it.

Any chance to get this parsed out a bit better?


Change History (3)

#1 @swissspidy
7 years ago

  • Component changed from Editor to Embeds
  • Focuses administration removed
  • Keywords needs-patch added
  • Version 4.8.2 deleted

#2 @ocean90
6 years ago

@swissspidy Looking at the result of the endpoint and it actually confirms what @MicroBerto is reporting. The endpoint only returns the embed code for the playlist, ignoring the current video ID. I'd expect for the iframe source.

#3 @jukkarau
6 years ago

I sent feedback to YouTube for this, I think the API should return the correct embed code with the request @MicroBerto described.

If they are not willing to fix this, maybe we could first convert the request URL to normal video embed and then add the list parameter for the returned code (src would be like @ocean90 linked), but that seems a bit hacky.

Note: See TracTickets for help on using tickets.