Reputation: 1124
I am uploading a video using the YouTube API V2 and I would like to share it (e.g. Twitter, FB, G+) once the upload completes. How can I check to make sure the video will be playable on all platforms supported by YouTube before sharing it? For example, I am uploading a WebM video but I want to make sure users on iOS devices can watch the newly uploaded video before I share it.
Upvotes: 0
Views: 5812
Reputation: 1124
Using YouTube API V2, you can poll for status of the video processing by looking at the element: https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_yt:state. Video entries that contain a tag are not playable. However, currently the absence of does not guarantee playback on all platforms, unfortunately. Therefore, in YouTube API v2 there is no way to programmatically determine the exact moment at which the video will become playable on iOS in this scenario.
Upvotes: 2