Displaying Youtube videos in Safari on an iPhone
| Project: | Video Filter |
| Version: | 6.x-2.5 |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
I noticed that Youtube videos won't display when viewed in Safari on the iPhone. After a bit of research it seems that iPhone Safari requires the <embed> tag to properly detect a Youtube clip and replace it with a Thumbnail link to the video.
Thanks to Video Filters themable "theme_video_filter_flash()" function this was an easy fix.
Simply theme the function by copying the source and adding the following line before the closing "</object>" tag gets appended to the output string:
$output = '<embed src="' . $video['source'] . '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="' . $video['width'] . '" height="' .$video['height']. '"></embed>';This might be something that should be added to a future release?
Note that I have only tested this with Youtube URLs, so there might be problems with other video codecs which use this function, but that seems unlikely.

#1
#2
Hey akolade,
Thanks for this, haven't seen it myself. I'll take a look and maybe we can add this in for all codecs.
#3
Did this ever get implemented in the current module?
#4
No, it's not been tested yet for all codecs. I'd be happy to have someone test and report, with a patch.