gpt4 book ai didi

silverlight - 如何在 silverlight 应用程序中播放 youtube 视频?

转载 作者:行者123 更新时间:2023-12-02 05:19:32 25 4
gpt4 key购买 nike

有什么办法可以实现吗?

我可能会从这个答案中找到解决方案:

You can also grab YouTube videos as MP4, hopefully that expands your player options. You can look into DirectShow CF for playback functionality, or host some other player in your app that supports MP4 or FLV.

尝试通过 IE 回放 移动版不行,因为版本 必要的 Flash 插件 视频播放支持不可用 (我上次检查过)。

要获取 MP4 文件,请向 这个网址:

"http://www.youtube.com/get_video?video_id= " + videoID + "&t="+ token + "&fmt=18"

要获取 FLV,请使用:

"http://www.youtube.com/get_video?video_id= " + videoID + "&t="+ token

要获取 token ,请调用:

"http://www.youtube.com/api2_rest?method=youtube.videos.get_video_token&video_id= " + 视频ID

我写了一个应用 YouTube 视频播放列表和同步 他们用我的掌上电脑,我用 TCPMP 使用 Flash 插件播放 视频(在我的应用程序外部)。 虽然 MP4 也适用于 PPC,但我 坚持使用 FLV,因为当时有些 YouTube 上的视频不可用 作为 MP4。我不会关心 现在这个。

可悲的是我的 PPC 坏了,现在我正在做 我的 iPhone 上有类似的东西,但我 不得不完全切换到 MP4 格式。 VLC的FLV播放 iPhone 对我来说太不稳定了。

Playing YouTube videos in a Windows Mobile application

最佳答案

不可能在 Silverlight 中本地播放 YouTube 视频(我认为永远不会)。您可以做的最接近的事情是使用 JS 界面,这将启动设备的 native 视频播放器(如果它是移动设备)或使用 Flash 播放。

您可以窃取 FLV 提要,但那非常糟糕,您不应该那样做!

关于silverlight - 如何在 silverlight 应用程序中播放 youtube 视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4481420/

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