我按照有关如何使用YouTube GDATA的教程。填充来自YouTube的视频列表视图和的onclick从stackoverflow
I have followed a tutorial on how to use the youtube gdata. Populating a listview with videos from youtube and a onclick from stackoverflow
但还是在YouTube上的视频播放里面没有我的申请。请帮我找到这个。
But still video play on youtube not inside my application. Please help me to find this.
推荐答案一旦你得到了你管网址...,从Url.See子串VIDEO_ID下面的例子中我已经给了。
Once you get the You tube url..., Substring the Video_ID from the Url.See the example below i have given.
您可以使用gdata.youtube/feeds/mobile/videos/VIDEO_ID API从实际你管url.data为在 XML格式的rtsp链接
You can use gdata.youtube/feeds/mobile/videos/VIDEO_ID api to get the rtsp link from the actual you tube url.Data is in XML format
一旦你的rtsp链接,你可以在VideoView的这里是的例子
once you get the rtsp link you can play video in VideoView here is the example
例如: 如果这个环节是视频 www.youtube/watch?v=sMM0R19IisI
For example: If this link is the video www.youtube/watch?v=sMM0R19IisI
然后 sMM0R19IisI 是Video_ID.So你可以通过这个视频ID上面API来获取rtsp链接
Then sMM0R19IisI is the Video_ID.So you can pass this video id to above api to get the rtsp link
要取得 JSON格式的数据使用gdata.youtube/feeds/mobile/videos/"+videoid+"?alt=json
请参考以下两个链接:
链接1
链路2
在你在 VideoView
更多推荐
从YouTube在Android的播放视频文件
发布评论