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&amp;hl=en&amp;fs=1&amp;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

clecidor’s picture

Use 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 : )