我想在Android VideoView中爲我的應用程序獲取YouTube視頻。 我正在瀏覽Google的YouTube API。我藉助此API文檔生成了客戶端ID,客戶端密鑰,重定向URL和代碼。 https://developers.google.com/youtube/2.0/developers_guide_protocol#OAuth2_Installed_Applications_Flow爲YouTube API安裝應用程序獲取訪問令牌
下一步是獲得安裝的應用程序的訪問令牌,我正在做同樣的上述文件解釋,但得到這個錯誤。
java.io.FileNotFoundException:https://accounts.google.com/o/oauth2/token?code=4/sfsekiMy-EWE_7der69fy3wsdfdsseclient_id=412600.apps.googleusercontent.com&client_secret=0P7H4yqRZY2jmpluiyswqnbz&redirect_uri=http://localhost/oauth2callback&grant_type=authorization_code
任何幫助,高度讚賞或者你可以建議一些方法來訪問我的Android應用程序的YouTube視頻僅使用的MediaPlayer和VideoView。
在此先感謝。
Soham:該作品爲RTSP(實時流協議)僅作爲我已經測試了.....不過的Youtube我們在Web中觀看的視頻不包含rtsp網址,而不包括如何在運行時爲每個視頻獲取rtsp網址。 – 2012-03-07 08:45:32
也許這將有助於:http://stackoverflow.com/questions/7937903/get-rtsp-url-from-youtube – Soham 2012-03-07 08:53:13