Active
Project:
Lightbox2
Version:
6.x-1.11
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2012 at 20:33 UTC
Updated:
16 Jul 2012 at 17:06 UTC
For some reason I cannot get a youtube video to play in a lightbox on an ipad or iphone (they play fine on my desktop). All of my regular (ie non-lightbox) embedded youtube videos play fine on iOS devices, but they just pull a white box when I put them in a lightbox. Here is the code I am using:
<a href="http://www.youtube.com/v/EivFMoiao4Q&hl=en&fs=1&rel=0" rel="lightframe[width:801px; height:500px]">Watch the QuantumCards Video</a>
Any thoughts on how to get them to play on iOS in a lightbox?
Comments
Comment #1
clecidor commentedUse PHP or Javascript browser-detection to switch the URL from:
http://www.youtube.com/v/EivFMoiao4Q
to:
http://www.youtube.com/watch?feature=player_embedded&v=EivFMoiao4Q
Then you'll have to skip lightbox altogether and have the link open in a new window. On the iOS mobile device, the YouTube app will be launched to play the video.
NOTE:
Also http://www.youtube.com/embed/EivFMoiao4Q
is preferable to http://www.youtube.com/v/EivFMoiao4Q ("/embed/" instead of "/v/"), because YouTube will present the iOS mobile user with a user-friendly error message : )