Best way to get Janus current sessions and clients

Hello guys,

I’m using Janus for creating multiple videorooms and I need my service to know what is the current number of rooms, subscribers and publishers. Is there any convenient way to get this data from Janus?

I know that I can use Admin API to get this data, but it requires many HTTP calls from my service to Janus (get sessions, then get handlers, then stats).
Also I tried to use Janus events but it requires my service to manage many event types and to save the current state in my service.

Maybe there is a different way to handle this which I do not know, I will be glad for you help!

You can use event handlers to track what happens in a Janus instance in a separate application. This presentation is a bit old but gives you an idea about how it works: Asynchronous event/state notifications in the Janus WebRTC server Providing administrators and deve… - YouTube

1 Like