How to embed an YouTube live streaming automatically in an webpage using php?
Something like querying the video at https://youtube.com/user/USERID/live when a transmission is on air?
How to embed an YouTube live streaming automatically in an webpage using php?
Something like querying the video at https://youtube.com/user/USERID/live when a transmission is on air?
You can easily do it with using search->list method by setting type=video and eventType=live
Here is another PHP search code sample that will get you started.
I am the author of the OP. I wrote this PHP class, maybe it will be useful for some so I'll link here:
https://github.com/iacchus/youtube-live-embed
It allows one to query a channel and embed the Live Streaming if there is one. May take some seconds or even minutes to YouTube API response to show the live streaming after the streaming is On Air.