Youtube V3 API : know if the video is avaliable on Android mobile device(Youtube V3 API : 知道视频是否在 Android 移动设备上可用)
问题描述
最近我用 Youtbe V3 API 检索了应该在 Android 应用上播放的视频信息.问题是其中一些在移动设备上不可用.根据文件,我没有找到相关的财产.我可以过滤掉那些视频吗?或者我应该在 http 请求中添加任何标头?
Recently I retrieve the information of videos which should be played on the Android apps with Youtbe V3 API. The problem is some of them are not avaliable on the mobile device. And I found no related property according to the document. Is it possible for me to filter out those videos? Or should I add any header within http request?
推荐答案
有两个概念可嵌入和联合.iOS 设备使用 iframe,因此它们基本上是嵌入的.使用播放器 API 的 Android 设备可以检查联合.
There are two concepts embeddable and syndicated. iOS devices use iframe so they basically embed. Android devices that use player API can check syndicated.
当您执行 search->list 时,您可以设置videoEmbeddable 和 videoSyndicated 为 true.
When you do a search->list, you can set videoEmbeddable and videoSyndicated to true.
或者,如果您正在遍历视频,对于每个视频,您可以执行 video->list 使用视频 ID 调用并检查 status.embeddable 在响应中.
Or if you are iterating through videos, for each video, you can do a video->list call with video id and check status.embeddable in the response.
这里有一篇关于这个主题的博文,甚至尽管示例在 v2 中,但信息仍然相关.
Here is a blog post about this topic, even though examples are in v2, information is still relevant.
这篇关于Youtube V3 API : 知道视频是否在 Android 移动设备上可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Youtube V3 API : 知道视频是否在 Android 移动设备上可用


基础教程推荐
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- LocationClient 与 LocationManager 2022-01-01