获取YouTube频道发布的视频播放Android中 [英] Get Youtube publish channel playlist videos in android
问题描述
可能的复制<一个href=\"http://stackoverflow.com/questions/10648310/get-the-youtube-playlist-and-the-video-id-of-a-channel-in-android\">this问题但我找不到我的问题的答案。
结果我试图读取 YouTube频道文档,但我不明白如何通过它的名字从 BBC新闻接收该频道的信息,例如。结果我试图按照样品code 在java中搜索视频,我可以得到通过搜索词视频列表。结果我不知道有没有什么办法让播放列表通过其名称(包含视频 ID
)的特殊公共频道,那么我可以在视频播放列表由 ID
?而且,我需要知道它的ID?
最后,我可以使用的HTTP GET API
从谷歌得到它。下面是有人需要他们的例子:结果
首先,我得到的频道ID
使用频道API
是这样的:
然后我用搜索API通过ID来获得这个频道的视频和播放列表:
<$p$p><$c$c>https://www.googleapis.com/youtube/v3/search?part=id%2C+snippet&channelId=UC16niRr50-MSBwiO3YDb3RA&maxResults=50&order=date&type=video%2C+playlist&key={YOUR_API_KEY} 这里在这里你可以尝试的地方的Youtube API
。
Possible duplicate this question but I can't find the answer for my problem.
I tried to read Youtube channel document, but I don't understand how to receive the channel information by its name, for example from BBC news .
And I tried to follow sample code in java to search video and I can get the videos list by search term.
I just wonder is there any way to get playlists (which contain video id
) of special public channel by its name, then I can video in playlist by id
? And do I need to know its id?
Finally I can get it by using Http GET API
from Google. Here is an example for someone need them:
First, I get the channel id
by using channel API
like this:
https://www.googleapis.com/youtube/v3/channels?part=id%2Csnippet&forUsername=bbcnews&key={YOUR_API_KEY}
Then I used Search API to get the videos and playlist of this channel by id:
https://www.googleapis.com/youtube/v3/search?part=id%2C+snippet&channelId=UC16niRr50-MSBwiO3YDb3RA&maxResults=50&order=date&type=video%2C+playlist&key={YOUR_API_KEY}
Here is the place where you can try Youtube API
.
这篇关于获取YouTube频道发布的视频播放Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!