Check if YouTube video is live or uploaded

前端 未结 2 1700
梦如初夏
梦如初夏 2021-01-05 14:15

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

2条回答
  •  自闭症患者
    2021-01-05 14:24

    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.

提交回复
热议问题