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.
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 CreditAttribution: 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 : )