eleventy-plugin-embed-everything icon indicating copy to clipboard operation
eleventy-plugin-embed-everything copied to clipboard

Add support for embedding playlists

Open gfscott opened this issue 1 year ago • 1 comments

Closes #149

At very long last, this PR adds support for YouTube playlists. There are two use cases:

  1. Embed a playlist that starts playing from the beginning. These URLs only include a Playlist ID and therefore don't work in Lite mode: https://www.youtube.com/playlist?list=PLFtSvldL7Mh4ismj4BgH33pBR9hbtBkxz
  2. Embed a single video as part of a larger playlist. These URLs include both a Video and a Playlist ID, and often the video's index, or position within the playlist. In Lite mode, these URLs will render the single video, instead of the playlist. https://www.youtube.com/watch?v=C04JZsoqs1A&list=PLFtSvldL7Mh4ismj4BgH33pBR9hbtBkxz&index=4

Known limitations in Lite mode

lite-youtube-embed doesn't recognize playlist IDs so if there's no video ID, the embed won't display anything in Lite mode. But if it finds a video ID (such as in the second example above) it will embed just that video.

gfscott avatar Oct 21 '24 21:10 gfscott

🦋 Changeset detected

Latest commit: fcde9ca6f41b5d204fc86cf13d93eb470545db1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
eleventy-plugin-youtube-embed Minor
eleventy-plugin-embed-everything-demo Patch
eleventy-plugin-embed-everything Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Oct 21 '24 21:10 changeset-bot[bot]