Using Emfield extensively throughout the my site with feeds and by users to adding videos from Vimeo, Youtube, etc simply without pasting the embed code, however getting comments from users that the videos added using Emfield are not playing on iPhones, whereas pasted embedded Youtube code plays fine in other parts of the site such as in articles and comments (although Vimeo videos don't because of Flash not working in iPhone Safari). Is there a fix or work around for at least some of the videos and if so which providers?

Comments

vm’s picture

Title: Video on iPhone » mobile browser compatibility

This doesn't seem iPhone specific. The same issue can be seen on my android 2.0 powered phone.

Trying to dig a bit deeper for the maintainer. I'll report further as soon as I can gather some more information. I don't have any content embedded directly in a node beyond the use of emfields.

@ tjbcham, have you viewed the source of a rendered page to see if anything jumps out, WRT being different between embedded in content and added with an emfield?

Also of note, I'd update the module to the latest stable release.

tjb74’s picture

Not sure what to look for in the two outputs... the Emfield code is saying in the first line that object type is saying it is Flash and the mobile devices don't have Flash players, but the pasted embed code says its Flash too but later. The allowscriptaccess is sameDomain for Emfield but always for the embed code...

Emfield page source which does not play Youtube on iPhone:

<div class="content" align="center">

    <div class="emvideo emvideo-video emvideo-youtube"><div class="emfield-emvideo emfield-emvideo-youtube">        <div id="emvideo-youtube-flash-wrapper-1"><object type="application/x-shockwave-flash" height="460" width="725" data="http://www.youtube.com/v/mg-zjgWqFkE&amp;rel=1&amp;hd=1&amp;enablejsapi=1&amp;playerapiid=ytplayer&amp;fs=1" id="emvideo-youtube-flash-1">
          <param name="movie" value="http://www.youtube.com/v/mg-zjgWqFkE&amp;rel=1&amp;hd=1&amp;enablejsapi=1&amp;playerapiid=ytplayer&amp;fs=1" />
          <param name="allowScriptAcess" value="sameDomain"/>
          <param name="quality" value="best"/>
          <param name="allowFullScreen" value="true"/>
          <param name="bgcolor" value="#FFFFFF"/>
          <param name="scale" value="noScale"/>
          <param name="salign" value="TL"/>
          <param name="FlashVars" value="playerMode=embedded" />
          <param name="wmode" value="transparent" />
        </object></div></div></div>    
     </div>

Pasted embed code which plays Youtube in iPhone:

<div class="content">
    <p><object width="560" height="340">
<param value="http://www.youtube.com/v/k7HIjwpdjTw&amp;hl=en_US&amp;fs=1&amp;" name="movie" />
<param value="true" name="allowFullScreen" />
<param value="always" name="allowscriptaccess" /><embed width="560" height="340" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" rel="lightbox" src="http://www.youtube.com/v/k7HIjwpdjTw&amp;hl=en_US&amp;fs=1&amp;"></embed></object></p>
      </div>
</div>
alex ua’s picture

The issue with the code you have posted is that it uses the deprecated embed tag, which means that the HTML won't work validate. Can we detect whether a person is on a mobile device and then switch it? Otherwise I think we should make an option that allows you have either: Valid HTML and no mobile support, or mobile support with html that won't validate.

rout’s picture

subscribe

sirkitree’s picture

Category: support » feature
Status: Active » Needs work
StatusFileSize
new0 bytes

Here's a patch that accomplishes this, not with an option, however embed now works on an iphone. Needs work to add the option.

quchidru’s picture

Pls reattach the patch
(emfield-mobile-embed.patch 0 bytes)

sirkitree’s picture

StatusFileSize
new1.71 KB

oh, hrm - not sure how that happened.

quchidru’s picture

Great
Thx
1 Q:
Don't you need the tag ?

sirkitree’s picture

what tag?

quchidru’s picture

The patch is adding
+ <embed src="$url" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" allowfullscreen="$fullscreen_value" width="$width" height="$height">

Doesn't need a closing tag? </embed>

tjb74’s picture

Thanks for the patch for Youtube. It works great. Vimeo has now has video playing as Quicktime on an iPhone...

peezy’s picture

Note: there is a solution inside the Media: YouTube Module (6x-2.5). Go to /admin/settings/media_youtube. under YouTube video player options, uncheck the option "Use the HTML5 player instead of the Flash-based." This will display your YouTube video as an object instead of an iframe, so it will work on pretty much any mobile device... with or withtout html5.