YouTube iOS SDK: correct GTLQueryYouTube parameters to filter out videos which can't be played on mobile?

后端 未结 2 842
天命终不由人
天命终不由人 2021-01-25 21:28

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 pa

2条回答
  •  面向向阳花
    2021-01-25 21:36

    One possible solution (admittedly, not very elegant) is to make two GTLQueryYouTube calls:

    1. videoSyndicated off (or set to all): search for the keyword "VEVO" in the description field of GTLYouTubeSearchResultSnippet, return top search result

    2. videoSyndicated on (set to true): best search result (with appropriate filters of your choice).

    If the first query returns a null result, then you assume that there is no VEVO video, and you use the next best playable video (2).

提交回复
热议问题