Problem with youtube video content loading in an iFrame for iOS app

Part of the app is pulling in helpful articles for the user from an API.  Some of those articles contain interactive content and youtube video.  Tho media uses iframe which doesn't work on iOS.  I tried the JW player addon as suggested in another question but wasn't successful.  Any suggestions or solutions is appreciated.
3 answers

Hi Andrew,We have embedded youtube in apps for a long time.

On your page use a format string widget for displaying an embedded youtube video. Use this html and use the youtube ID from your entity (${YoutubeVideoID}). It uses default Bootstrap classes 


<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="${YoutubeVideoID}?rel=0" style="width: 100%; " allowfullscreen ></iframe>


If you use phonegap please add this snippet in your config.xml of your phonegap package:

    <!-- allow assets to be loaded and open links in the app itself, see: -->
    <!-- Issue 204079: Allow retrieval of any resource. Custom widgets can point to anything. -->
    <access origin="*" />
    <allow-navigation href="*://*" />

Hi Andrew,

I assume you tried using the embedding provided by YouTube? As far as I know iframe does work on iOS. However, the issue comes from the height attribute.


Try to add this to the parent container:

 -webkit-overflow-scrolling:touch; overflow:auto; 

*Not tested*

Other: Another tutorial


It can be solved in a simple way just use the youtube embed plugin, that's for comfortable to use and user-friendly and won't break pages.