YouTube embed gives "restricted from playback on certain sites" error despite API metadata indicating otherwise

youtube, youtube-api

Solution

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.

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

Problem

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. This isn't working for me. For example, this video: https://www.youtube.com/watch?v=waxat-_tRH8 doesn't embed: https://www.youtube.com/embed/waxat-_tRH8 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 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). What am I missing here? EDIT: The embed link above works in my web browser, but not in my client app's WebView....!?

Original source

Related problems