Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if YouTube video is live or uploaded

I have a YouTube Live Event. I am able to play the video using the YouTube IFrame Player API. I want to know if there is any way that I can find if the video is a Live event video or a regular uploaded video. I need this information for designing my controls.

like image 960
Moni Avatar asked Jan 07 '16 02:01

Moni


1 Answers

The only way you can do this (currently) is with youtube backend api. Get data about the video based on its id and in the response you have a property snippet.liveBroadcastContent which is either live, none, or upcoming.

like image 190
J.D. Avatar answered Sep 30 '22 06:09

J.D.