Hey guys,

I really like how simple and effective this module is for Drupal 7 - though am having a problem with the html5/iframe embeds for youttube; the module seems to be writing embeds with the wrong markup for fullscreen and this resulting in these embeds not displaying the fullscreen toggle...

My embedded youtube videos' code looks like this when I view the source of a node:

    <iframe src="//www.youtube.com/embed/ZOco-gIY-g4?width=680&amp;height=382&amp;theme=dark&amp;autoplay=1&amp;hd=1&amp;rel=0&amp;showinfo=0&amp;modestbranding=1&amp;iv_load_policy=3&amp;autohide=1&amp;start=0&amp;wmode=opaque" allowfullscreen="" frameborder="0" height="382" width="680"></iframe>  

As you can see - the embed includes allowfullscreen="" instead of simply allowfullscreen

When I looked into video_embed_field.handlers.inc I couldn't specifically see where the extra ="" is coming from!?!?

Please help!




jec006’s picture

Status: Active » Fixed

I couldn't get it to reproduce the failing behavior, but I fixed the ="" part for attributes without a value portion. It now just prints out allowfullscreen.

This at the very least looks better. http://drupal.org/commitlog/commit/25834/319212a5217640cd077d15db80a699c...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pukku’s picture

Status: Closed (fixed) » Active

Hi! I realize I'm reopening an already closed issue, but the applied solution is incorrect, or at least, only partially correct.

In HTML5, this is the correct solution. However, RSS feeds are not HTML5, but rather XML, and so this code will break some RSS readers. In XML, the correct change would be to allowfullscreen="allowfullscreen".

allella’s picture

The "full screen" button was not working in my Chrome browser on Ubuntu.

I was using the media_youtube module for D6. In the iframe it was using a video URL of the pattern //www.youtube.com/v/videoidhere.

I used the theme preprocessing function to make it output //www.youtube.com/embed/videoidhere
and it immediately started allowing the fullscreen button to work.

In short, try changing the /v/ to /embed/ in the YouTube URL if you're having a problem.

allella’s picture

Issue summary: View changes