Although it is possible to embed YouTube videos, this does not work with YouTube playlists. I'm not sure why this is so. It'd be nice if:

- I could embed playlists
- the preview playlist was just resized (as with videos) OR the preview from the first video in the playlist is used
- the thumbnail image was the thumbnail image from the first video in the playlist (I don't think playlists have their own thumbnail specified)

Here's some example (bogus) embed code:


<object width="425" height="350"><param name="movie" value=""></param><param name="wmode" value="transparent"></param><embed src="" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>


<object width="530" height="370"><param name="movie" value=""></param><embed src="" type="application/x-shockwave-flash" width="530" height="370"></embed></object>

You can distinguish playlists and videos by their url: playlists start with, whereas videos start with This might be helpful if a distinction between videos and playlists needs to be made. Also, playlists always have an extra column listing the videos contained in it. This leads to different widths as with videos, so probably there'd have to be a setting that allows specifying height/width for videos and playlists seperately.

#18 playlist.patch5.17 KBJody Lynn


Assigned:Unassigned» aaron

thanks for the ideas; i'll see if i can work something like that into it. by next week, i should have another solution in place as well, to import specific videos from playlists (as an add-on module).


My current solution is:
Include the embed-code in the body field, and add an image (hidden) that is only displayed where teasers are needed. It gives a similar result to what I need.

It'd still be nice if the Embedded Media Field would support both.
Supporting playlists should be easy:
Right now there's a regex used that needs a v (single video) to be in the link. If that check fails (empty), then check for p instead (playlist). Depending on which was successful (if any) you then use the according embed code.
I'm not sure about supporting thumbnails for playlist.

Component:User interface» Embedded Media Import

playlists is a couple of hours away (as soon as i can find that precious time to finish it up). already works for flickr -- embedded media import.

Status:Active» Postponed

postponed to d6 release, then backport to d5.

Status:Postponed» Fixed

I'm marking this as fixed because this is now possible using the combination of emfield, FeedAPI, and the FeedAPI_Mapper. I will update this issue queue in the near future with a link to the handbook page after I create it.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ping. This was marked closed, but I can't seem to find the documentation being referred to. Pointers?

Status:Closed (fixed)» Active

marking this as active again until it is resolved further

A quick search turns this up:

Which links to this:

It's for Drupal 5 but the concept and most of the modules are the same.

Version:5.x-1.x-dev» 6.x-1.x-dev

I think it shouldn't be too hard to get this working properly. Youtube playlists have their own url, formatted like[playlistID]. Nowadays the embed code provided by Youtube looks like this:

<object width="480" height="385">
  <param name="movie" value="[playlistID]&hl=en&fs=1"></param>
  <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
  <embed src="[playlistID]&hl=en&fs=1" type="application/x-shockwave-flash"
    width="480" height="385" allowscriptaccess="always" allowfullscreen="true"></embed>

I have never written an emfield provider include, but if time permits, I would like to give it a go soon (for the 6.x version). I'm just wondering: what would be the best/proper/easiest way, enhance or create a new

Status:Active» Fixed

This has long been possible using FeedAPI, and will be available shortly via Feeds, so I'm marking this as "fixed"

Status:Fixed» Active

@alexUA - can you provide a pointer to some documentation that suggests how that would integrate with this module?

There's a use case for doing this with the inline filter which wouldn't be doable with feeds creating nodes. Is that a separate feature request?

Status:Active» Closed (fixed)

@adub, yes, that's a separate request. @rcross- it's linked to on both the main emfield page and in the Drupal documentation page that's linked on the front as well.

Status:Closed (fixed)» Active

Actually, I'm reopening this, because what's being asked for is not the ability to add each video in a playlist, but rather the ability to embed the playlist itself, rather than a video.

I'm investigating this for a client and here's what I think we need to do to get this to work with the current YouTube provider. We need to either use regex, as the provider is currently doing, or possibly switch it over to use parse_url(), and determine whether we're being passed a video or a playlist. We can grab the id as normal, but we'll have to save the information to use later so that we can output the correct player. After that, the only difference I can find is that we'll need to use '/p/' rather than '/v/' in the output url, so this should all be relatively straight forward and should definitely be added to the youtube provider file directly.

@Alex - yes, embedding the playlist is what I had been looking for. I would personally be ok with having a different field type, so that you don't have to do a lot of crazy detection in order to make it an all encompassing field. This could also be helpful at a theme level, to distinguish if it is a single video or playlist in the display.

Status:Active» Needs review
new5.17 KB

Here's a patch to allow playlists. Getting the thumbnail from the first video in the playlist was a little complicated, but it's working for me.

Status:Needs review» Patch (to be ported)

I added this to the 6.1x-dev branch- I'm marking "to be ported" so that it finds its way over to media_youtube at some point.

Status:Patch (to be ported)» Needs review

can you commit it to the 6.2x-dev as well? i haven't moved youtube out of there yet...


Status:Needs review» Patch (to be ported)

oops, changed status...

Done- I'll leave the status until we move it over to media_youtube.

#18 Confirmed working...
Thanks Jody.

Project:Embedded Media Field» Media: YouTube
Component:Embedded Media Import» Code

I'm moving this to the Media: YouTube queue to make sure it gets committed there...

Status:Patch (to be ported)» Fixed

ok, I refactored and applied this patch. Thanks, @Jody Lynn!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

What about D7 I'm having no luck at all embedding playlist url's such as the following on the latest 7.x dev:

no one...?

Same problem. Is there a way to insert Youtube playlists and/or channels to our sites under Drupal 7?

#foripepe I'm stuck at this for some time now, so far my best option was to use the oembed module, instead of media: youtube (
With oembed you can configure the url schemes from the configuration menu for quite a number of providers, so you won't get the can't handle url scheme error message.

At the moment I'm still struggling a bit with it, so let us know if you've managed to get it to work properly.