YouTube has depreciated Flash and YouTube videos no longer work with older versions of this module.

See this issue:
http://stackoverflow.com/questions/38917194/why-do-youtube-embedded-vide...

Can someone provide a simple hack/solution to those using older versions of this module to rectify this?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HS created an issue. See original summary.

jenlampton’s picture

Version: 6.x-1.17 » 6.x-1.27
FileSize
11.59 KB

Here's a patch for 6.x-1.27 that removes the flash player and adds the standard iframe that youtube supports. Note, this patch does not support all the options like autoplay, etc, its just a quick hack-fix to get videos working until sites can be upgraded off Drupal 6.x.

jenlampton’s picture

Please at least update from 6.17 to 6.27 before trying to apply :)

HS’s picture

Thank you, jenlampton! I am grateful to you for your help - may you be blessed in abundance. I have not tested the patch but editing the youtube.inc file, as you have suggested, worked for 6x.1.17 version of this module.

dzinkevich’s picture

Thanks to jenlampton for her patch. It didn't quite work with the site we inherited, as it was using the default external plugin.

Attached is a patch that adds both her original patch as well as my updates. Cheers!

yadranko’s picture

Version: 6.x-1.27 » 6.x-2.7

What about the patch for the latest version (6.x-2.7)? I would hate to have to downgrade this module. Thanks for any further help on this.

ericG’s picture

for 6.x-2.7 I took only the bottom part of dzinkevich's patch and it worked (I had uploaded the edited patch yesterday Aug 18, but someone seems to have deleted it), so if you need to fix 6.x-2.7 take the patch on comment 5 and delete everything above
diff --git a/media_youtube/themes/media-youtube-default-external.tpl.php b/media_youtube/themes/media-youtube-default-external.tpl.php

and it will work
there is no emfield/contrib/emvideo/providers directory in the 2 branch so applying the patch in #5 fails

yadranko’s picture

Thank you so much ericG, it worked like a charm!

SolasArd’s picture

Just noticed that youtube videos weren't displayed on my site when using HTML5 player as well, thanks to this thread I figured I needed to make changes to the /media_youtube/themesmedia-youtube-html5.tpl.php file as well, replacing src="<?php echo $url; ?>?hd=1" with src="https://www.youtube.com/embed/<?php print $video_id ?>" worked for me