I'm trying to find the right GTLQueryYouTube parameters to filter out videos which can't be played on mobile (in an iOS UIWebView). The videoEmbeddable and videoSyndicated params are too restrictive (they filter out all VEVO videos).
In our iOS app, we search for YouTube videos via GTLQueryYouTube, leaving the videoEmbeddable and videoSyndicated parameters blank.
This returns Vevo videos which are generally playable in the UIWebView. For example "Rihanna - Diamonds" (lWA2pjMjpBs) is playable. It can't be played in an embedded view.
Some videos, however can't be played. For example "Lana Del Rey - Gods and Monsters" (3BwfuFuYOWE) can't be played in the UIWebView. The YouTube page loads, but instead of playing the video I see an error "The content owner has not made this video available on mobile."
We want to filter out these non-playable videos when searching. The GTLQueryYouTube API only supports filtering for "videoEmbeddable" and "videoSyndicated", neither of which correctly filter out the Lana Del Rey video, but leave in the Rihanna video.
It seems like there's a missing filter parameter to filter out these types of videos. Inspecting the metadata doesn't reveal any noticeable difference between the Rihanna and Lana Del Rey videos.
Ideas?
In general there is no way to determine all playback restrictions using the API, unfortunately. We have a guide for API v2 here: http://apiblog.youtube.com/2011/12/understanding-playback-restrictions.html but no similar resource for v3 yet.
I'd recommend using the (videoEmbeddable and videoSyndicated) search restricts since this is what they're designed for. One approach is to take the user to m.youtube.com for playback of videos that are restricted from 3rd party apps. Alternatively, you can try to approach the content owner and persuade them to change the config of the content (since this is something YouTube enforces but does not configure).
About the videos you have listed specifically:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With