analog-nico
analog-nico

Reputation: 2780

How to identify if a video is a Premiere? ...via the YouTube API

On YouTube we have uploads of recorded videos, live streams, and now also Premieres.

Using the Videos: list endpoint of the YouTube Data API we can distinguish recorded videos from live streams by calling the endpoint with the liveStreamingDetails part. If details are given then it is a live stream. If not then it is a regular upload of a recorded video.

This approach doesn’t help me with identifying Premieres. They appear as if they were live streams. At least with the endpoint above I see no difference between live streams and Premieres.

Is there any way to check if a video is in fact a Premiere? I have the video id and want to achieve this by calling any of YouTube’s APIs.

Upvotes: 3

Views: 2303

Answers (1)

Joost Schuur
Joost Schuur

Reputation: 4482

Edit: The way I implemented this, I look for snippet.liveBroadcastContent, which is either 'upcoming', 'live' or 'none'.

This way you can identify if a video is currently a premiere, or the premiere has ended and it's a regular video.

Upvotes: 1

Related Questions