Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to have the embedded video play from a specific point in time, as explained here: http://blog.searchenginewatch.com/blog/081027-102002
Comment | File | Size | Author |
---|---|---|---|
#33 | media_youtube-start_and_end_support-370927-33.patch | 4.5 KB | cboyden |
| |||
#31 | media_youtube-start_and_end_support-370927-31.patch | 4.41 KB | solariel |
#22 | start_and_end_support-370927-21.patch | 4.08 KB | cristianalcaraz |
Comments
Comment #1
Alex UA CreditAttribution: Alex UA commentedThis would be a nice addition to the module, though I'm not really sure how it would best be implemented. I'm guessing the only way to do this would be to look for the #t= hash and pulling out the value. But- have you tried using the #t= in the embedded code? Does it still work?
Comment #2
andrewsuth CreditAttribution: andrewsuth commented+1
From: http://www.online-tech-tips.com/cool-websites/how-to-specify-a-starting-...
There's also an example of the final output of the object on the site. This method works for me just fine.
Comment #3
andrewsuth CreditAttribution: andrewsuth commentedComment #4
yannickoointeresting...
Comment #5
Alex UA CreditAttribution: Alex UA commentedYouTube is no longer supported directly in Emfield, moving to the Media_YouTube issue queue.
Comment #6
eiland CreditAttribution: eiland commentedsubscribe
Comment #7
Pls CreditAttribution: Pls commentedWhat has to be done to have this feature? I mean is this technically easy to implement or difficult? Thanks.
Comment #8
Bob Enyart CreditAttribution: Bob Enyart commentedAs of June 30, 2012, for me, this is not working:
In the YouTube window, instead of the video streaming, I get this: "An error occurred. Please try again later."
I'm a user. I can't figure out what version of Drupal our site is running. (BTW, it's http://prolifeprofiles.com)
Help :)
Comment #9
yannickooIt's Drupal 6.25 (CHANGELOG.txt and the duplicate tag).
Comment #10
RobW CreditAttribution: RobW commentedRight now only the 7.x versions are under active development. This looks like a pretty simple regex and formatter addition -- let's try and get it into 7.x-2.x, and then if anyone backports it in a patch for 6.x I'll commit it.
Comment #11
RobW CreditAttribution: RobW commentedThe YouTube player parameter docs cover a
start
parameter that doesn't seem to work anymore. Although it's undocumented, it looks like the current parameter ist=XXhXXmXXs
.Comment #12
RobW CreditAttribution: RobW commentedThere are a few ways I can see this working. The simplest would be to rewrite the regex in MediaInternetYouTubeHandler.inc to return the video id with the
t
parameter, then use regex in theme.inc to split them up again, sincewmode=opaque
has to be the first query string parameter.Regex wizards welcome to offer regexes.
Comment #13
RobW CreditAttribution: RobW commentedMarked #1273714: Respect timestamp in embed URL as duplicate.
Comment #14
lapith CreditAttribution: lapith commentedHere is a pretty simple patch as a first attempt. As far as I can tell the end param is not supported directly through the browser (IE I can't add an end to a youtube link and have that work on their site, it only works on embeds).
For this to work simply append the t and end params to the youtube link. The t can be added automatically with the share button, the end will need to be added manually:
https://www.youtube.com/watch?v=[youtube_video]&t=[start_seconds]&end=[end_seconds]
Comment #15
lapith CreditAttribution: lapith commentedJust a quick change of a function name.
Comment #16
lapith CreditAttribution: lapith commentedJust a quick change of a function name.
Comment #17
Funksmaname CreditAttribution: Funksmaname commentedAny chance of a port to 6 please? :*(
Comment #18
yannickooMissing space after "if".
Maximal 80 characters in a comment line.
Missing space after "//" and punctation mark.
Comment #19
Rob_Feature CreditAttribution: Rob_Feature commentedJust an update here since I wanted to add this patch to the latest D7 version:
@youtu\.be/.+?\?t=([^"\& ]+)@I'
Hope that at least helps send folks in the right direction...
Comment #20
brulain CreditAttribution: brulain commentedHi,
Also needing YouTube time stamp : is #16 patch OK ?
Thanks
Comment #21
joseph.olstadRob_Feature, can you please roll up a new patch with your tweak, thanks!
to clarify, this is for the 7.x-2.x version?
or 7.x-3.x ?
Comment #22
cristianalcaraz CreditAttribution: cristianalcaraz as a volunteer commentedHi,
I've created a patch in order to work with new Youtube URL pattern as mentioned by @Rob_Feature.
Also added a condition to check the parameter ?t= with the new format XhYmZs.
Hope you find this useful :)
Comment #23
joseph.olstadthis is for 3.x right?
Comment #24
cristianalcaraz CreditAttribution: cristianalcaraz at bigmomo commentedYes @joseph.olstad :)
Sorry for the late reply!
Comment #25
cboyden CreditAttribution: cboyden commentedComment #26
koosvdkolk CreditAttribution: koosvdkolk commented#22 does not work for the following YouTube URL
https://www.youtube.com/embed/uEy_NGDfo_8?start=10&end=20
Comment #27
koosvdkolk CreditAttribution: koosvdkolk commentedComment #28
koosvdkolk CreditAttribution: koosvdkolk commentedI updated patch #22
Comment #29
solideogloria CreditAttribution: solideogloria commentedThe added code does not follow Drupal coding standards.
Comment #30
solariel CreditAttribution: solariel at Alpha Web Group for Kryt B.V. commentedHere's a cleaned version of #28 with somewhat unified regulars.
Comment #31
solariel CreditAttribution: solariel at Alpha Web Group for Kryt B.V. commentedUpdated regulars to eliminate possible false positives and fixed warnings in the matchEmbedCode() method when partial time (ex. 1m2s) is passed.
Comment #32
joseph.olstadlatest patch failed to apply, needs a re-roll
Comment #33
cboyden CreditAttribution: cboyden commentedRe-rolled patch is attached.