YouTube 嵌入提供了“限制在某些网站上播放"的功能.错误,尽管 API 元数据另有指示 [英] YouTube embed gives "restricted from playback on certain sites" error despite API metadata indicating otherwise

查看:12
本文介绍了YouTube 嵌入提供了“限制在某些网站上播放"的功能.错误,尽管 API 元数据另有指示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让我的客户端应用程序过滤掉不允许嵌入的视频.我的理解是,没有办法限制提要(即 format=5 是不够的)来做到这一点,我必须自己检查条目的属性,对于 <yt:accessControl> 标签和 <app:control><yt:state> 标签.

I am trying to have my client application filter out videos that do not allow embedding. My understanding here is that there is no way to limit the feed (i.e. format=5 is insufficient) to do this and that I must check the properties of the entry myself, for the <yt:accessControl> tag and the <app:control> and <yt:state> tags.

这对我不起作用.

例如,这个视频:https://www.youtube.com/watch?v=waxat-_tRH8

不嵌入:https://www.youtube.com/embed/waxat-_tRH8

即使 API 返回的数据表明(据我所知)它应该能够嵌入:https://gdata.youtube.com/feeds/api/videos/waxat-_tRH8?v=2

even though the API returned data indicates (as far as I can tell) that it should be able to embed: https://gdata.youtube.com/feeds/api/videos/waxat-_tRH8?v=2

该条目不包含任何 <yt:noembed> 标签 (参见前面的问题)<media:restriction type='country' relationship='deny'>ME DE RS</media:restriction> 没有解释这一点,因为我在美国 (见上一个问题) (参见前面的问题).

The entry does not contain any <yt:noembed> tag (see prior question) and the <media:restriction type='country' relationship='deny'>ME DE RS</media:restriction> does not explain this since I am in the US (see prior question) (see prior question).

我在这里错过了什么?

上面的嵌入链接在我的网络浏览器中有效,但在我的客户端应用程序的 WebView 中无效......!?

The embed link above works in my web browser, but not in my client app's WebView....!?

推荐答案

某些视频应用了域级白名单或黑名单.这由内容所有者自行决定.

Certain videos have a domain-level whitelist or blacklist applied to them. This is done at the discretion of the content owner.

如果存在白名单或黑名单,并且无法确定嵌入站点的域(可能是因为在您的原生应用程序中没有真正的引用域),那么默认行为是阻止播放.

If there is a whitelist or a blacklist, and the domain of the embedding site can't be determined (perhaps because of there not being a real referring domain in the case of your native application), then the default behavior is to block playback.

这篇博文也有更多细节:http://youtube-eng.blogspot.co.uk/2011/12/understanding-playback-restrictions_28.html

This blog post has a bit more detail as well: http://youtube-eng.blogspot.co.uk/2011/12/understanding-playback-restrictions_28.html

这篇关于YouTube 嵌入提供了“限制在某些网站上播放"的功能.错误,尽管 API 元数据另有指示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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