I am working with the Youtube Live Streaming api. I don't see this, but I am wondering if there is a way to get a list of all viewers.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you have the specific stream's videoId
you can use the undocumented live_stats endpoint to get the number of viewers:
https://www.youtube.com/live_stats?v={videoid}
回答2:
@JAL - your answer works great. Thanks, I have also found success using this url:
Getting the live stream details (like viewer numbers):
https://www.googleapis.com/youtube/v3/videos?part=snippet%2CliveStreamingDetails&id={VIDEO_ID_HERE}&fields=items(id%2Csnippet(title%2CliveBroadcastContent)%2CliveStreamingDetails%2FconcurrentViewers)&key={YOUR_API_KEY_HERE}
I found this url from another question: Get list of gaming live streams on Youtube.