Youtube V3 API : 知道视频是否在 Android 移动设备上可用 [英] Youtube V3 API : know if the video is avaliable on Android mobile device

查看:17
本文介绍了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 时,您可以设置videoEmbeddablevideoSyndicated 为 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 移动设备上可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆