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.
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?
Comment | File | Size | Author |
---|---|---|---|
#7 | emfield-mobile-embed.patch | 1.71 KB | sirkitree |
#5 | emfield-mobile-embed.patch | 0 bytes | sirkitree |
Comments
Comment #1
VM CreditAttribution: VM commentedThis 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.
Comment #2
tjb74 CreditAttribution: tjb74 commentedNot 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:
Pasted embed code which plays Youtube in iPhone:
Comment #3
Alex UA CreditAttribution: Alex UA commentedThe 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.
Comment #4
rout CreditAttribution: rout commentedsubscribe
Comment #5
sirkitree CreditAttribution: sirkitree commentedHere's a patch that accomplishes this, not with an option, however embed now works on an iphone. Needs work to add the option.
Comment #6
quchidru CreditAttribution: quchidru commentedPls reattach the patch
(emfield-mobile-embed.patch 0 bytes)
Comment #7
sirkitree CreditAttribution: sirkitree commentedoh, hrm - not sure how that happened.
Comment #8
quchidru CreditAttribution: quchidru commentedGreat
Thx
1 Q:
Don't you need the tag ?
Comment #9
sirkitree CreditAttribution: sirkitree commentedwhat tag?
Comment #10
quchidru CreditAttribution: quchidru commentedThe 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>
Comment #11
tjb74 CreditAttribution: tjb74 commentedThanks for the patch for Youtube. It works great. Vimeo has now has video playing as Quicktime on an iPhone...
Comment #12
peezy CreditAttribution: peezy commentedNote: 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.