久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在 Windows Mobile 應用程序中播放 YouTube 視頻

Playing YouTube videos in a Windows Mobile application(在 Windows Mobile 應用程序中播放 YouTube 視頻)
本文介紹了在 Windows Mobile 應用程序中播放 YouTube 視頻的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在開發(fā)用于播放 YouTube 視頻的 Windows Mobile 6(或也許 5)應用程序.好吧,它應該播放 YouTube 視頻(并控制/查詢播放器的狀態(tài)變化、當前幀/時間等)

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.)

在網(wǎng)上搜索了相當長的一段時間(并進行了幾次嘗試)后,我仍然找不到這樣做的方法.我知道的選項是:

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:

  • 使用嵌入在 HTML 中、可通過 JavaScript 控制的 YouTube 播放器.但是,我無法從 IE Mobile 觀看 YT 視頻,首先 - 我收到一條錯誤消息,內(nèi)容類似于您需要啟用了 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 的格式

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.

幫助我,StackOverflow 的智者!

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 播放它不起作用,因為支持視頻播放的 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 發(fā)出請求:

"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

要獲取令牌,請調(diào)用:

"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 使用.我現(xiàn)在不會擔心這個.

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 壞了,現(xiàn)在我在 iPhone 上做了類似的事情,但我不得不完全切換到 MP4 格式.VLC 在 iPhone 上的 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.

這篇關(guān)于在 Windows Mobile 應用程序中播放 YouTube 視頻的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

LINQ to SQL and Concurrency Issues(LINQ to SQL 和并發(fā)問題)
Yield return from a try/catch block(try/catch 塊的收益回報)
Should I call Parameters.Clear when reusing a SqlCommand with a transation?(重用帶有事務的 SqlCommand 時,我應該調(diào)用 Parameters.Clear 嗎?)
what does a using statement without variable do when disposing?(處理時不帶變量的 using 語句有什么作用?)
Why doesn#39;t TransactionScope work with Entity Framework?(為什么 TransactionScope 不適用于實體框架?)
How to dispose TransactionScope in cancelable async/await?(如何在可取消的 async/await 中處理 TransactionScope?)
主站蜘蛛池模板: 四虎永久在线视频 | 亚洲成人av在线 | 五十路av| 最新av在线 | 国产乱码一区二区三区 | 少妇一级毛片 | 日韩免费精品 | www.亚洲成人 | 国产在线一区二区 | 国产在线日韩 | 一区二区三区视频 | 天天干天天草 | 午夜影院黄 | 能看的av| 免费看一级毛片 | 日韩av资源| 黄色片网站视频 | 中文字幕理伦片免费看 | 国产在线观看一区 | 国产成人小视频 | 国产成人福利 | 日韩av在线免费 | 国产成人在线播放 | 欧美色偷偷 | 日韩欧美精品在线 | 天天操天天操天天 | 国产精品毛片一区视频播 | 成年网站在线观看 | 18成人免费观看网站 | 91免费在线视频 | 色综合久久天天综合网 | av免费在线观看网站 | 欧美日韩国产中文 | 亚洲毛片av | 91免费版看片 | 国产精品婷婷 | 日韩一级黄 | 日韩一级av毛片 | 99久久婷婷国产综合精品草原 | 国产精品日韩在线 | 久草黄色|