I've been searching for a long time for a solution but all i can find are things related to the old versions of phonegap.
I basically need to include some youtubes videos on my app, but currently using a include code such as:
<iframe width="240" height="180" src="http://www.youtube.com/embed/PEfxz7PuI0g" allowfullscreen></iframe>
This doesn't display anything apart from the space the video would take up, just a grey box. I'm using phonegap 2.9.0 and the latest version of xCode. I've tried setting the domains to allow youtube, but this didn't help:
MediaPlaybackRequiresUserAction: NO
AllowInlineMediaPlayback: YES
OpenAllWhitelistURLsInWebView: YES
ExternalHosts
*.youtube.com
*.ytimg.com
I believe that was for previous versions of phonegap apps for ios. Can anyone help, it would be appreciated.
WebViews in SwiftUI Just replace the URL in the WebViewModel init with your YouTubeURL and that's it, you have a YouTube video embedded in the app.
try the below code hope it will help full for you
var video_embeded='PEfxz7PuI0g';
<object><param name="movie" value="https://www.youtube.com/v/'+video_embeded+'&hl=en_US&feature=player_embedded&version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="https://www.youtube.com/v/'+video_embeded+'?suggestedQuality=medium&hl=en_US&feature=player_embedded&version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always"></embed></object>
this is help full for me....
I had a similar issue with a PhoneGap app. The video (either YouTube or Vimeo) worked well on Android, but on iOS there was just an empty space. I tried many different solutions, but the only one that really worked was adding the following lines to config.xml:
<preference name="AllowInlineMediaPlayback" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<allow-navigation href="*youtube*" />
<allow-navigation href="*ytimg*" />
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With