gpt4 book ai didi

c# - 为什么我不能在720HD中嵌入youtube或在Windows 8 Webview中使用全屏按钮?

转载 作者:行者123 更新时间:2023-12-03 06:33:19 26 4
gpt4 key购买 nike

根据
embed youtube html5 player shows no fullscreen button

我应该能够获得全屏按钮。但是当我尝试将youtube嵌入到webview中时它不起作用,它仅显示基本的youtube播放器,默认情况下没有全屏按钮和低分辨率视频

    protected override void OnNavigatedTo(NavigationEventArgs e)
{

string videoID = "lP7SSJSj1NM";
string videoWidth = "800";
string videoHeight = "480";

string videoSrc = "http://www.youtube.com/embed/" + videoID + @"?autoplay=1&vq=hd720";

StringBuilder html = new StringBuilder();
html.Append(@"<body style=""padding:0; margin:0"" >");

html.Append(@"<iframe frameborder=""0"" style=""padding:0; margin:0"" width=""" + videoWidth + @""" height=""" + videoHeight + @""" src=" + videoSrc + " allowfullscreen=" + @"""1" + @"""></iframe>");

html.Append(@"</body>");
myWebView.NavigateToString(html.ToString());

}

最佳答案

对我来说,我用这个尝试

contentViewBorder.Width = 1305;
contentView.Width = 1305;
contentViewBorder.Height = 800;
contentView.Height = 800;

contentView.Margin = new Windows.UI.Xaml.Thickness(-520, -210, (490), 1500);

关于c# - 为什么我不能在720HD中嵌入youtube或在Windows 8 Webview中使用全屏按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17913730/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com