c# - MyToolkit for windows phone 7.x "Sorry we can' t play this file on your phone"for VEVO videos

标签 c# xaml youtube windows-phone

我正在尝试直接从我的应用程序上传视频。我正在使用很棒的 SDK MyToolkit,但有一些错误。

这是我的源代码:

protected override void OnBackKeyPress(CancelEventArgs e)
        {
            if (YouTube.CancelPlay())
                e.Cancel = true;
            base.OnBackKeyPress(e);
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            YouTube.CancelPlay(); // used to reenable page

            base.OnNavigatedTo(e);            
        }

        private void OnPlay(object sender, RoutedEventArgs args)
        {

            YouTube.Play(id, true, YouTubeQuality.Quality480P, e =>
            {
                if (e != null)


      MessageBox.Show(e.Message);
        });
    }

    private void btnYoutube_Tap(object sender, System.Windows.Input.GestureEventArgs e)
    {
        YouTube.Play(id, true, YouTubeQuality.Quality480P, ex => 
        {
            if (ex != null)
            {
                MessageBox.Show("...");
            }
        });
    }

此代码不会产生错误,但在打开视频链接时会出现以下消息:

"Sorry we can't play this file on your phone"



我在 xaml 中使用 YoutubeButton:
<Controls:YouTubeButton x:Name="btnYoutube" Tap="btnYoutube_Tap" Height="269"/>

MyToolkit Documentation

I found a possible cause of the problem. I checked other videos and they run perfectly with this code. However the video channel VEVO can not be used. Does anyone know any solution to the problem?

最佳答案

恐怕这是 YouTube 的限制。不完全确定如何解锁它,但相当多的视频被标记为总部或带有“非移动”标志。
某些 channel 也只允许在桌面查看和更改手机上的浏览器版本(移动与桌面)没有帮助。

甚至不确定是否可以从 Windows Phone 设备上传视频。

一个建议是查看 YouTube 开发者页面,看看是否有任何标签可以在上传时以编程方式设置。

关于c# - MyToolkit for windows phone 7.x "Sorry we can' t play this file on your phone"for VEVO videos,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17930397/

相关文章:

c# - 强制 C# 应用程序在 64 位服务器上以 32 位模式运行

javascript - 按用户更改日期标签

c# - 开发票务系统的基本架构问题

c# - 调整内容大小以填充窗口的 `Client Area`

wpf - 程序员编辑 XAML 的最佳方式

python - 尝试通过Python下载youtube字幕时,为什么会出现Regex错误?

c# - 如何向数据库中插入数据? - 用户定义的类

wpf - 将路径填充绑定(bind)到 ContentPresenter 中的按钮前景

android - Android中的YouTube API提供的YouTube视频速度 Controller

javascript - css 属性下的自定义值 - CSS