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 移动设备上可用


基础教程推荐
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01