WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 3 months ago

#52170 closed feature request (maybelater)

Create an embed and/or block for YouTube Music

Reported by: sterndata Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Embeds Keywords:
Focuses: Cc:

Description

links to music.youtube.com (e.g., https://music.youtube.com/watch?v=Ht_BfhweF4I&feature=share) do not create an embedded player for YouTube Music.

Please add this to the list of embeds or create a core block to allow embeds from this site.

Change History (6)

#1 @cspowers
6 months ago

Yes please! I manage a music web site and would prefer to use YouTube music as my source over apple music, amazon, or spotify.

#2 follow-up: @Otto42
6 months ago

If you remove the "music" part from the URL, and that new URL works, then that will embed just fine.

https://youtube.com/watch?v=Ht_BfhweF4I

YouTube music is just another view of normal YouTube, for the most part.

YT Music has no built in special way to do embedding by itself. It does not support oEmbed and it doesn't have any special embed code for it.

#3 in reply to: ↑ 2 @cspowers
6 months ago

Yep that's what I am doing now. The only thing is when you listen to an album on YT music you get fewer and shorter ads. :-)

But thanks for letting me know. I didn't know YTM has no way to support oembed. Maybe they will eventually.
Calvin

Replying to Otto42:

If you remove the "music" part from the URL, and that new URL works, then that will embed just fine.

https://youtube.com/watch?v=Ht_BfhweF4I

YouTube music is just another view of normal YouTube, for the most part.

YT Music has no built in special way to do embedding by itself. It does not support oEmbed and it doesn't have any special embed code for it.

#4 @Otto42
6 months ago

The difference in the ads has to do with the content it's playing.

The "uploaded" music from your own collection is not public, obviously, so it can't be embedded anywhere. These are actually saved as videos on a hidden private YT account, called "Music Library Uploads". These videos are basically the same as any other video. They only have one frame for the video, which is usually the cover art, and then the audio is standard MP4 audio. It's a thin wrapper around the song, basically.

The ads come from the player itself, which is on your device or in the browser. There is no specific way to embed that, there's no public API for it, etc. It's all internal stuff. There's some unofficial APIs, but when you dig into it, the actual player part is basically the same as the normal youtube player. So, the YTM one is not specifically embeddable, and for uploads which are private they can't be embedded anyway.

So better off using the normal YT embeds. At most, the "music.google.com" could be added and changed to "youtube.com" and thus allow the existing code to work without messing with the URL, but that's about it until YouTube expands the reach and abilities of YT Music.

#5 @geheren
6 months ago

  • Resolution set to maybelater
  • Status changed from new to closed

I agree, this would be an awesome block. As @Otto42 mentioned without oEmbed, hard to do right now. Marking this ticket as maybelater.

Per @aristath (https://github.com/WordPress/gutenberg/issues/24475) - "If/when YouTube Music supports oEmbed, it will work out of the box simply by pasting the URL in the editor."

#6 @desrosj
3 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.