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.

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Joram created an issue. See original summary.

Joram’s picture

Issue summary: View changes
BD3’s picture

I can confirm this as well. Only happens for YouTube from what I can see. Vimeo autoplays just fine, YouTube not so much.

remaye’s picture

Same 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...

Vincent_Jo’s picture

Confirming!

changing line 198 in video_embed_field.handlers.inc to:
$settings_str = _video_embed_code_get_settings_str($settings);

works! ("related videos" to "off")
Thanks a lot!

kevincrafts’s picture

kevincrafts’s picture

thomas.frobieter’s picture

Status: Active » Reviewed & tested by the community

Thanks alot kevincrafts - patch is working! :)

Anybody’s picture

Confirming RTBC. Please create a new stable release. This is completely broken currently!

citlacom’s picture

I have tested the #7 and confirmed that it works well.

Anybody’s picture

Great! :) Is there an active maintainer who many create a new stable release?

Sam152’s picture

Assigned: Unassigned » Sam152

I 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.

plopesc’s picture

Status: Reviewed & tested by the community » Active

Hello 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.

Sam152’s picture

Assigned: Sam152 » Unassigned
tyler.frankenstein’s picture

These 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

caw67’s picture

works: #2685721: Youtube autoplay does not work

glynster’s picture

Status: Active » Reviewed & tested by the community

@caw67 I confirm as well, works very well. RTBC +1

colepacak’s picture

Sweet relief. RTBC +1

rbrandon’s picture

Component: Miscellaneous » Code
FileSize
1.37 KB

@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.

Tritof’s picture

Patch #19 worked perfectly for me. Thanks a lot !

loopy1492’s picture

And the status of this one seems to have been changed today: https://www.drupal.org/node/2682611

BD3’s picture

#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.

danwonac’s picture

Patch #19 works for me. Thanks!

AdamPS’s picture

Status: Reviewed & tested by the community » Needs work

I 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.

tyler.frankenstein’s picture

Status: Needs work » Needs review
FileSize
1.12 KB

Here'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.

Anybody’s picture

#25 tested successfully. +1 for RTBC.

AdamPS’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

#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.

danwonac’s picture

Applied patch #25 instead of #19, 'show related videos' works as expected. Thanks everyone :)

CRZDEV’s picture

Patch #25 works as expected, thanks.

lathan’s picture

same issue is present in d8 version. this patch needs to be ported there as well.

Vinay15’s picture

Patch in #25 works for me. +1

smartsystems160’s picture

#25 worked for me as well

twfahey’s picture

Will 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.

capellic’s picture

+1 for patch in #25. Thank you!

jaesperanza’s picture

+1 for #25, thanks, tyler.frankenstein and kevincrafts!

Chris Matthews’s picture

Version: 7.x-2.0-beta11 » 7.x-2.x-dev
Parent issue: » #3019514: Plan for Video Embed Field 7.x-2.0 stable release
johnnydarkko’s picture

5 years later and adding another +1 for patch in #25. Thanks, all!

kunal_sahu made their first commit to this issue’s fork.

kunal_sahu’s picture

Hi @all Thanks you for all your patches. The patch youtube_autoplay-2580459-25.patch applied successfully.

PS C:\xampp\htdocs\drupal\web\themes\custom\video_embed_field-2580459> git apply -v .\youtube_autoplay-2580459-25.patch
Checking patch video_embed_field.handlers.inc...
Checking patch video_embed_field.module...
Applied patch video_embed_field.handlers.inc cleanly.
Applied patch video_embed_field.module cleanly.

LGTM.

Creating an MR for helping out maintainer. Thanks tyler.frankenstein for the patch . Thanks