0
votes

Our html app occasionally embeds YouTube videos in the UI. We use a simple iframe to embed them.

When we put the app on our phones (iOS / iOS Simulator) the video opens in mobile Safari.

What's the right way to get the embedded YouTube videos to play within the app, and not launch Safari?

1
Whitelisting the youtube url in the app config got me part of the way, but now I'm getting a Webview error: Error Domain=WebKitErrorDomain Code=102 "Frame load interrupted" UserInfo={NSErrorFailingURLStringKey=https://www.youtube.com/embed/vEg4SEch27w?modestbranding=1&showinfo=0&rel=0, NSLocalizedDescription=Frame load interrupted, NSErrorFailingURLKey=https://www.youtube.com/embed/vEg4SEch27w?modestbranding=1&showinfo=0&rel=0probabble

1 Answers

0
votes

Since YouTube redirects you to its https:// protocol site, you need to whitelist https://youtube.com -- just whitelisting http://youtube.com is not enough.