Webinar app: How to get attendee/viewer count?

Hi there, I’m working on a webinar application and one thing I’d like to do is display the number of people actively watching a live stream. I’m guessing this is pretty trivial to do but I didn’t see anything obvious in the documentation. Can someone please point me in the right direction? :slight_smile:

Thanks!

Hi Phil,
I guess you should be able to solve this via the REST API. If you retrieve the session details with https://docs.openvidu.io/en/2.16.0/reference-docs/REST-API/#get-openviduapisessionsltsession_idgt then the answer will contain the property “connections”. You can check the “content” array to find out more about each connection. If you then count all connections which are subscribed to the stream published by the webinar moderator you should get the correct viewer count.