Windows Phone 8 中的 Youtube URL [英] Youtube URL in Windows Phone 8

查看:43
本文介绍了Windows Phone 8 中的 Youtube URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不访问浏览器的情况下在 Windows Phone 8 中启动 Youtube 应用程序.基本上,我目前正在使用以下代码,它会将我带到默认浏览器,而不是打开 Youtube 应用程序:

How do I launch the Youtube app in Windows Phone 8 without going to the browser. Basically I am currently using the following code and it takes me to the default browser instead of opening up the Youtube app:

Dim webBrowserTask As New WebBrowserTask()
webBrowserTask.Uri = New Uri("http://www.youtube.com/embed/3aP3KBsh3Y8",UriKind.Absolute)
webBrowserTask.Show()

我希望能够直接启动 Youtube 应用程序.到目前为止,我还没有想出一个解决方案.

I want to be able to launch the Youtube app directly. So far I haven't been able to come up with a solution.

推荐答案

有一个稍微好一点的方法.使用 WebBrowserTask 但以这种格式提供 URL

There is a slightly better way. Use WebBrowserTask but give it URL in this format

String.Format("vnd.youtube:{0}?vndapp=youtube",youTubeId)

其中 youTubeId 是 youtube 视频的 ID(在您的情况下为 3aP3KBsh3Y8)

where youTubeId is the ID of the youtube video (3aP3KBsh3Y8 in your case)

这篇关于Windows Phone 8 中的 Youtube URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆