Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Xamarin.Forms Webview YouTube Video Help Android Only? iOS and WinPhone Works Perfect

$
0
0

Not sure what the cause is but I get a message saying "If playback doesn't being shortly, try restarting your device." It shows the image of the youtube video but when you click play it just stays black and doesn't play...

Here is a sample of what I'm doing:

var videoHTML = "<body style="background-color:black;"><center><iframe width="270" height="205" src="https://www.youtube.com/embed/VRnNc4a0XJE?showinfo=0" frameborder="0" allowfullscreen></iframe><br><div style="padding:15px;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;font-size: 10px;color:white"><b>CELEB P.O.V. - Guys Choice Awards with Mackenzie Stith</b></font></div><br>";
        var youtubeSource = new HtmlWebViewSource();
        youtubeSource.Html = videoHTML;
        Webview.Source = youtubeSource;

This works perfectly on iOS and Windows Phone...

I even tried making a custom renderer for the webview and setting is a ChromeClient and still doesn't play. I have tried the emulator and a phone with different Android versions and still no go.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>