Kenrelya Kenrelya - 1 year ago 80
PHP Question

Can we know if we are streaming with youtube api?

i trying to know if my channel is streaming on youtube. I'm using the youtube api v3 with the php library.
I'm able to get the last broadcasts with liveBroadcasts.list but when I start streaming with OBS I put the parameters broadcastStatus = active and nothing is returned.
I also tried with liveStreams.list but I still get nothing. I don't know what I'm doing wrong, can someone explain me please ? :D

Answer Source

Try to use the search.list, Here you can set the optional parameters to search what you need. Like the channelId, eventType that you can set to live to include active broadcast, and type parameter that restricts a search query to only retrieve a particular type of resource.

Read the other parameters to know more about its purpose and description.

For more information you can also check this SO question: