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 created a video style and applied it to the video embed field as a display formatter.
Options i used that weren't being applied:
- Autoplay (turned on)
- Show info (turned off)
- The video progress bar and player controls will be visible throughout the video. (selected)
Then i tried using the teaser style that comes with the module and i changed the width and height first. This worked fine. Changing the above options didn't work.
Issue fork video_embed_field-2580459
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Joram CreditAttribution: Joram commentedComment #3
BD3 CreditAttribution: BD3 commentedI can confirm this as well. Only happens for YouTube from what I can see. Vimeo autoplays just fine, YouTube not so much.
Comment #4
remaye CreditAttribution: remaye commentedSame thing with me + "show related videos" to "off" not working.
I could make it all work changing line 198 in video_embed_field.handlers.inc to:
$settings_str = _video_embed_code_get_settings_str($settings);
not using urlencode() anymore : not sure it is safe to do that, but it fixed the problem...
Comment #5
Vincent_Jo CreditAttribution: Vincent_Jo commentedConfirming!
works! ("related videos" to "off")
Thanks a lot!
Comment #6
kevincrafts CreditAttribution: kevincrafts commentedoops
Comment #7
kevincrafts CreditAttribution: kevincrafts commentedHere's the patch.
Comment #8
thomas.frobieterThanks alot kevincrafts - patch is working! :)
Comment #9
AnybodyConfirming RTBC. Please create a new stable release. This is completely broken currently!
Comment #10
citlacom CreditAttribution: citlacom commentedI have tested the #7 and confirmed that it works well.
Comment #11
AnybodyGreat! :) Is there an active maintainer who many create a new stable release?
Comment #12
Sam152 CreditAttribution: Sam152 at PreviousNext commentedI currently maintain the 8.x branch, but have access to 7.x In the absence of the other maintainers, I might be able to look at testing these changes and cutting a new release.
Comment #13
plopescHello all.
That line was added due to #2537318 . So removing it will break that again. Could you try to provide a patch where both problems will disappear?
Thanks for all your work and interest.
Comment #14
Sam152 CreditAttribution: Sam152 at PreviousNext commentedComment #15
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedThese issues are definitely related. The patch I made in #2685721: Youtube autoplay does not work is almost identical to this one, except it will just encode the values instead. I'd recommend using the other patch, and closing this as a related/duplicate. I believe the patch also covers the original reason for the botched url encoding: #2537318: Percentage width/height breaks player
Comment #16
caw67 CreditAttribution: caw67 commentedworks: #2685721: Youtube autoplay does not work
Comment #17
glynster CreditAttribution: glynster commented@caw67 I confirm as well, works very well. RTBC +1
Comment #18
colepacak CreditAttribution: colepacak commentedSweet relief. RTBC +1
Comment #19
rbrandon CreditAttribution: rbrandon commented@kevincrafts good patch
I found another case where the URL was encoded incorrectly, this mostly impacted playlist URL's. Also when using playlist URL's the construction of the URL in that function was not correct. In that case the URL already had a "?" appended along with some parameters, the URL ended up having multiple '?' one appearing half way through the parameter list.
New Patch Attached.
Comment #20
Tritof CreditAttribution: Tritof commentedPatch #19 worked perfectly for me. Thanks a lot !
Comment #21
loopy1492 CreditAttribution: loopy1492 commentedAnd the status of this one seems to have been changed today: https://www.drupal.org/node/2682611
Comment #22
BD3 CreditAttribution: BD3 commented#19 works for me as well. I have this running on about 40 sites without known issues. Any way that we can get this committed? The suggested videos at the end of the YouTube videos are... let's just say... not professional... and don't blame my browser history either cause you may or may not be right! This patch fixes this amongst the others mentioned above.
Comment #23
danwonac CreditAttribution: danwonac commentedPatch #19 works for me. Thanks!
Comment #24
AdamPS CreditAttribution: AdamPS at AlbanyWeb commentedI think patch #19 has two problems
- As @tyler.frankenstein pointed out in #15 it reintroduces the problem fixed in #2537318: Percentage width/height breaks player. % must be encoded in URLs.
- The patch removes a call to check_plain on $id. I agree @rbrandon is right there is a problem "In some cases the $id will include a list ID parameter for playlists." However I don't think we can remove check_plain entirely because that seems likely to introduce a security bug. Just a thought, it might be simpler to raise the list ID problem as a separate bug.
The patch in #2682611: Fix Video player youtube formatter settings not being applied seems like the correct one to me.
Comment #25
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedHere's the patch from #2682611: Fix Video player youtube formatter settings not being applied attached, and I've closed the other issue as a duplicate.
Comment #26
Anybody#25 tested successfully. +1 for RTBC.
Comment #27
AdamPS CreditAttribution: AdamPS at AlbanyWeb commented#25 reviewed and tested.
There were 3 other reviewers in #2682611: Fix Video player youtube formatter settings not being applied so marking as RTBC. Upping the priority to Major because YouTube playback doesn't work properly, a regression compared with the previous release.
The issue from #19 with playlist URLs is still open, but it seems separate from the issue described here. It would be useful to create a new issue with title (so people can find it), repro scenario (the URL) and symptoms. This would facilitate a discussion of the correct secure patch.
Comment #28
danwonac CreditAttribution: danwonac commentedApplied patch #25 instead of #19, 'show related videos' works as expected. Thanks everyone :)
Comment #29
CRZDEV CreditAttribution: CRZDEV at Metadrop commentedPatch #25 works as expected, thanks.
Comment #30
lathansame issue is present in d8 version. this patch needs to be ported there as well.
Comment #31
Vinay15Patch in #25 works for me. +1
Comment #32
smartsystems160 CreditAttribution: smartsystems160 commented#25 worked for me as well
Comment #33
twfahey CreditAttribution: twfahey as a volunteer and at University of Texas at Austin commentedWill this be merged anytime soon? Happy to help in anyway I can. Would like to use this in production without having to bother w/ patch.
Comment #34
capellic+1 for patch in #25. Thank you!
Comment #35
jaesperanza CreditAttribution: jaesperanza as a volunteer and commented+1 for #25, thanks, tyler.frankenstein and kevincrafts!
Comment #36
Chris Matthews CreditAttribution: Chris Matthews commentedComment #37
johnnydarkko CreditAttribution: johnnydarkko at Sage Tree Solutions commented5 years later and adding another +1 for patch in #25. Thanks, all!
Comment #39
kunal_sahu CreditAttribution: kunal_sahu at Valuebound for Valuebound commentedHi @all Thanks you for all your patches. The patch youtube_autoplay-2580459-25.patch applied successfully.
LGTM.
Creating an MR for helping out maintainer. Thanks tyler.frankenstein for the patch . Thanks