公共部分類WebViewPoc:ContentPage { 公共WebViewPoc() { 的InitializeComponent(); Init(); }
private void Init()
{
HtmlWebViewSource personHtmlSource = new HtmlWebViewSource();
personHtmlSource.SetBinding(HtmlWebViewSource.HtmlProperty, "HTMLDesc");
personHtmlSource.Html = @"<html><body> <div style=' position: relative; padding-bottom: 56.25%; padding-top: 25px;'> <iframe style='position: absolute; top: 0; left: 0; width: 100%; height: 100%;' src='https://www.youtube.com/embed/bVdfj7HXuXE' frameborder='0' allowfullscreen></iframe></div> </body></html>";
var browser = new WebView();
browser.Source = personHtmlSource;
Content = browser;
}
}
@ user1,任何線索? –
我會看[Rox.VideoPlayer nuget](https://www.nuget.org/packages/Rox.Xamarin.Video/)或[Xamarin Video Player](https://components.xamarin.com/view/視頻播放器),他們似乎都允許你從YouTube上流式傳輸。儘管第二環節的成本爲50美元。但第一個是免費的 – user1
我看到了第二個鏈接,我想這是免費的,無論如何讓我看看第一個謝謝 –