Closed (fixed)
Project:
Media: YouTube
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2012 at 12:00 UTC
Updated:
22 Jun 2017 at 12:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jjclint commentedI did some digging around and it seems that there should be a pattern add on to the following code in MediaInternetYouTubeHandler.inc - so it'll normalize a playlist pattern such as: http://www.youtube.com/watchlist=PL7DEACAA1C5EB3336&v=PZgHXAek0No&featur...
or
http://www.youtube.com/view_play_list?p=PL7DEACAA1C5EB3336&v=PZgHXAek0No
Am I correct?
Comment #2
nikkubhai commentedAny update ? Youtube playlist has simple format like http://www.youtube.com/playlist?list=PL6B08BAA57B5C7810
Comment #3
jjclint commented@nikkubah I've tried several things so far I only had luck with the oEmbed module, it's very strange that you can't embed playlists using the media: youtube module and there is almost no discussion about it in the issues section
Comment #4
traviscarden commentedMarked as duplicates of this issue:
Comment #5
RobW commentedThis would be a great feature. I might be able to do some work on it next month, but until then: Patches welcome.
Comment #6
RobW commentedComment #7
weirdovideo commentedAnyone?
.........
Anyone?
..........
Comment #8
awolfey commentedHere's a patch. There is some duplicated code, and some parts could be a little tighter, but it works and could use some additional eyes in the meantime.
It will handle links like:
Also, it looks like this module makes a ton of http requests to youtube. Many of those could be cached statically I think.
Comment #9
radiobuzzer commentedDo you need it to be tested or we should wait for an improved patch?
Comment #10
awolfey commentedPlease test if you need it. I'm using it in production with no problems. I marked it needs work because I wanted to smooth out some things, which I have scheduled for today.
Comment #11
awolfey commentedHere's an updated patch against the current dev.
Comment #12
skolesnyk commentedI confirm the latest patch as working! Huge thanks!
Comment #12.0
skolesnyk commentedadded missing link
Comment #13
johnhanley commentedI'm surprised playlist support (i.e. this patch) wasn't included in the latest RC. My client is unable to upgrade from the dev version without it.
Comment #14
johnhanley commentedI don't want to disparage the effort here, but unfortunately the playlist patch introduces a lot of adverse problems.
The URI is save incorrectly resulting in mangled URL when outputted with file_create_url():
http://youtube.com/playlist?list=PL_1TzcAmZQmjfDe-A1t6r3WJIUkA6hAxr
instead of
http://www.youtube.com/watch?v=Jx4ATI2Ito8&list=PL_1TzcAmZQmjfDe-A1t6r3W...
In addition the corresponding preview image is saved using the playlist code instead of the video code. Example:
PL_1TzcAmZQmjfDe-A1t6r3WJIUkA6hAxr.jpg
instead of
Jx4ATI2Ito8.jpg
Comment #15
Brian E. Conklin commentedAny updates on incorporating this into the module? It would be very useful.
Comment #16
shandman commentedAlso interested in a commit.
Comment #17
zerolab commentedAttaching a new patch against latest dev, based on #11.
The patch:
1. Handles embedding videos from a playlist, with support for playing the next video automatically. e.g. https://youtu.be/_WcJfxZEZaY?list=PLjgO-QqeHQ3vE4bC3iz-0eeiH3lZo3K-Z
2. Handles playlists as above, and should handle thumbnails correctly.
Feedback is most welcome.
Cheers,
Dan
Comment #18
mrprasa commentedWill this be a feature of the next release? I am currently using 7.x-3.0 and am wondering if I should try the dev version with the patch for playlists (comment #17) or wait until the next recommended version.
Comment #19
zerolab commentedAnother version that allows a graceful fallback a la #2498493: No exception handling when error from YouTube oEmbed.
Comment #20
ksenzeePatch no longer applies after #2475883: Original thumbnail path generation problem went in. Will see about rerolling it.
Comment #21
ksenzeeHere's a reroll that applies to 3.x. It seems to work but could use review.
Comment #22
justmagicmaria commentedVerified that this worked for me. It inserted the thumbnail from the first video and it played them one after another when played. Very nice!
Comment #23
heathdutton commented#21 seems to work. Been 8 months, can we get it comitted?
Comment #24
steinmb commentedIt would be good to have tests for this format also.
Comment #25
capysara commentedI wasn't able to apply the patch (using the dry run). I haven't applied very many patches. Am I missing something?I ran: patch -p1 --dry-run < media_youtube-playlist-support-1405528-21.patchpatching file includes/MediaInternetYouTubeHandler.incpatching file includes/MediaYouTubeStreamWrapper.inc
Hunk #2 succeeded at 50 with fuzz 2.
Hunk #3 FAILED at 66.
1 out of 3 hunks FAILED -- saving rejects to file includes/MediaYouTubeStreamWrapper.inc.rej
patching file themes/media_youtube.theme.inc
I was trying to apply it to 3.x instead of the dev. Testing now.
Update: #21 works great for me! Thanks!
Comment #26
ameymudras commentedThe patch didnt work for me as the protocol was not set while adding playlist. Have included a fix for the same.
Comment #27
joseph.olstad@steinmb , would you be able to request maintainer role for this module and take up the slack here?
or someone else? :)
seems like media_youtube could use a bit of TLC
Comment #28
steinmb commented@joseph - Let me have a look/ponder, but your right. It is in dire need of TLC.
Comment #30
joseph.olstadComment #31
joseph.olstadin 7.x-3.x dev branch
Comment #32
brandonpost commentedAfter I updated this module to version 3.1, my site (which is served entirely over https) started throwing mixed content warnings on pages that have Youtube videos embedded. I tracked the problem down to the patch in #26 of this issue. In that patch, a change is made to the media_youtube_preprocess_media_youtube_video function that sets $protocol to http: whenever the nocookie option is not set.
I ended up creating a process function in a custom module that removes the http: from the url in order to eliminate the mixed content warnings.
I would re-roll another patch to correct this, but I don't have time at the moment to figure out the problem #26 was trying to solve by adding the line that sets $protocol to http:. I just wanted to put this out there in case anyone else is running into the same problem of mixed content warnings.
Comment #33
joseph.olstad@brandonpost , thanks for the feedback. I've openned a new issue for this. If you could review the patch I made, that'd be great, or if you have a better patch, let me know. As for your process function in your custom module, could you show us the code for that? Just paste it in so we can see which hook you used and what the code is.
Here is the related issue, post your responses here:
#2883877: http forced when nocookie is disabled