0

enter image description here I am new to Xamarin Forms. I am facing one problems right now. I am tying to play YouTube video in WebView, WebView showing first look of video with play button, But after click on play button start progress bar and after 2-3 seconds stop progress bar and screen blank with black color. While I am getting message like “Video unavailable”, How can I play the video using webview, Give me a solution to resolve this issue. I have posted screenshot above

Notes: 1) example of the url which does not work https://www.youtube.com/embed/gj8FAuexQy4 2)In AndroidManifest.xml for application tag I added android:hardwareAccelerated="true" as well as I am also given permission android:name="android.permission.INTERNET"

P.Thiyagu
  • 917
  • 2
  • 7
  • 15
  • please follow this link: it may be help you https://stackoverflow.com/questions/45280034/single-youtube-video-embedding-in-xamarin-forms-but-not-youtube-list/48274863#48274863 – Mridul Malviya Oct 19 '19 at 16:57
  • For embed vedio, you could refer to this link: https://forums.xamarin.com/discussion/59329/playing-an-youtube-video-from-ios-app – Wendy Zang - MSFT Oct 22 '19 at 05:29

1 Answers1

0

If you add a youtube videos inside to your app, the play store reject it.

The best solution is Xamarin.Essentials to open the youtube videos on to the browser or open the youtube app like this ....

Device.OpenUri(new Uri("youtube url"));
G.Mich
  • 1,607
  • 2
  • 24
  • 42
  • I don't want open youtube, I like to play only a video on a mobile app, is it possible to play youtube video using web view? – P.Thiyagu Oct 22 '19 at 04:50