0

根据 嵌入 youtube html5 播放器显示没有全屏按钮

我应该能够获得全屏按钮。但是当我尝试将 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());

    }
4

1 回答 1

0

对我来说我用这个试试

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

            contentView.Margin = new Windows.UI.Xaml.Thickness(-520, -210, (490), 1500);
于 2013-10-20T08:13:20.243 回答