播放YouTube视频在Windows Mobile应用程序 [英] Playing YouTube videos in a Windows Mobile application

查看:200
本文介绍了播放YouTube视频在Windows Mobile应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Windows Mobile 6(或者5)可以播放YouTube视频的应用程序。那么,它的的播放YouTube视频(和控制/查询有关状态的变化,当前帧/时间等播放器。)

I am working on an application for Windows Mobile 6 (or maybe 5) that plays YouTube videos. Well, it should play YouTube videos (and control/query the player about status changes, current frame/time, etc.)

精练后现在相当一段时间在网络(以及一些试验),我仍然没有找到一个方法来做到这一点。我知道的选项是:

After scouring the web for quite some time now (and a few trials), I still couldn't find a way to do this. The options I know of are:


  • 使用YouTube播放器,嵌入HTML,通过JavaScript控制。但是,我无法从IE浏览器的移动观看YT视频,首先 - 我得到一个错误信息说沿着线的东西,你需要使用Flash Player 8及JavaScript的浏览器启用

  • Use the YouTube player, embedded in HTML, controllable via JavaScript. However, I couldn't watch YT videos from IE Mobile, to begin with -- I get an error message saying something along the lines of "you need a browser with Flash Player 8 and JavaScript enabled".

主机媒体播放器的控制,但WMP拒绝玩YT视频,包括移动格式。

Host a Media Player control, but WMP refuses to play YT videos, including the Mobile format.

使用的DirectShow 。我还在寻找到这一个(我从来没有与COM工作过,更别说DirectShow的,在此之前),但我还没有找到一个支持的解决方案的 YouTube的格式(S)

Use DirectShow. I'm still looking into this one (I've never worked with COM, let alone DirectShow, before), but I am yet to find a solution that supports YouTube's format(s)

我宁愿用C#这个应用程序,但是C ++的作品了。

I would rather write this application in C#, but C++ works, too.

帮助我,计算器的​​Ø智者先贤!

Help me, O Wise Sages of StackOverflow!

推荐答案

您还可以抢YouTube视频的MP4,希望这扩展了您的播放器选项。你可以看看DirectShow的CF播放功能,或者在托管您的应用程序,支持MP4或FLV其他一些球员。

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 Mobile将不会工作中,根据需要Flash插件视频播放支持的版本不可用(我最后一次检查)。

Trying to play it back through IE mobile won't work, as the version necessary of the Flash plug-in with video playback support isn't available (last time I checked).

要获取MP4文件对这个URL的请求:

http://www.youtube.com/get_video?video_id=+ VIDEOID +& T公司= +令牌+&放大器; FMT = 18

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

要获得FLV使用这样的:

http://www.youtube.com/get_video?video_id=+ VIDEOID +& T公司=+令牌

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

获得令牌的呼叫这样的:

http://www.youtube.com/api2_rest?method=youtube.videos.get_video_token&video_id= + VIDEOID

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

我写了一个应用程序,将抢到的YouTube视频播放列表,并与我的PocketPC同步起来,我用TCPMP与Flash插件来播放视频(来自外部的我的应用程序)。虽然MP4在PPC也工作了,我坚持为FLV,因为当时在YouTube上的一些影片不作为MP4。我不会担心这个了。

I wrote an app that would grab a playlist of YouTube videos and sync them up with my PocketPC, I used TCPMP with the Flash add-on to playback the video (externally from my app). Although MP4 also worked on the PPC, I stuck to FLVs because at the time some videos on YouTube were not available as MP4. I wouldn't be concerned about this now.

可悲的是我的PPC坏了,现在我在做我的iPhone类似的东西,但我不得不完全切换到MP4格式。在iPhone上的VLC的FLV播放太生涩了我。

Sadly my PPC broke, now I'm doing something similar on my iPhone but I had to switch completely to the MP4 format. VLC's FLV playback on the iPhone was too jerky for me.

这篇关于播放YouTube视频在Windows Mobile应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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