本文介绍了是否可以在android中集成youtube频道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在 android 中集成 YouTube 视频的代码.

我想要的是创建一个 listview 来列出不同的频道,当用户点击一个频道时,它会显示该频道的所有视频.通过这种方式,当一个新视频被加载到一个频道中时,它也会自动在我的应用程序中可用.

是否可以在 Android 中集成 YouTube 频道?

解决方案

是的!查看 Android Youtube Player API 和 YouTube API.

安卓播放器:https://developers.google.com/youtube/android/player/

YouTube API:https://developers.google.com/youtube/

YouTube 播放器 API 示例:(zip 中的示例文件夹)https://developers.google.com/youtube/android/player/downloads/

编辑

数据 API 可让您获取有关频道中视频的信息,然后您可以使用该信息来构建视频列表并相应地对其进行更新.

例如,以下内容将从频道中检索最新视频:

https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20

https://developers.google.com/youtube/v3/>

祝你好运!

I have the code for integrating YouTube videos in android.

What I want is to create a listview which lists different channels, and when user clicks on a channel it shows all the videos for that channel. By this way when a new video is loaded in a channel it will automatically be available in my app also.

Is it possible to integrate YouTube channel in android?

解决方案

Yes! Check out the Android Youtube Player API and the YouTube API.

Android Player:https://developers.google.com/youtube/android/player/

YouTube API:https://developers.google.com/youtube/

YouTube Player API Sample: (sample folder in zip)https://developers.google.com/youtube/android/player/downloads/

EDIT

The Data API lets you get information about videos in a channel, you can then use that info to construct your list of videos and update it accordingly.

For example, the following would retrieve the latest videos from a channel:

https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20

https://developers.google.com/youtube/v3/

Good Luck!

这篇关于是否可以在android中集成youtube频道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-21 00:50