1

Without using the Youtube API, is there a way to get a playlist embedded in your webpage?

I know for a single video you would do something like:

<iframe src="https://www.youtube.com/embed/<%#Eval("MyLinkField")%>?rel=0"></iframe>

where MyLinkField would be the 11-character ID that youtube uses for each video.

I can't figure out how to get a playlist to embed in a webpage.

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117
  • 4
    https://support.google.com/youtube/answer/171780?hl=en should help you – DaniS Jan 20 '18 at 17:27
  • I'm not 100% sure then link above is still valid. The share button that it refers to is not available for playlists – Erresen Jan 20 '18 at 17:47
  • Here is an active link to the docs: https://support.google.com/youtube/answer/171780?hl=en But I can't seem to successfully embed a playlist of private videos, which https://stackoverflow.com/a/11519445/470749 implies I should be able to do. – Ryan Mar 13 '20 at 19:12

1 Answers1

1

I think this is what you need:

<iframe src="https://www.youtube.com/embed?listType=playlist&list=PLAYLIST_ID"></iframe>

Where PLAYLIST_ID is the id from the querystring when viewing the playlist:

enter image description here

https://jsfiddle.net/71q4pe8v/

Erresen
  • 1,923
  • 1
  • 22
  • 41