Detect active simulcast profiles by Producer

Suppose i have a producer with 3 simulcast profiles configured, and sending a webcam video. I know that all 3 are sent only if network conditions are good, if connectivity sucks, it will switch off top profile, and if it really badly sucks, keep only the lowest profile.

Is there any event or anything which lets me detect these changes? Can i be notified about change of set of currently active simulcast profiles in producer, or at least get their current list at a given moment?

Someone suggested guessing by bitrate, but it’s such a shaky idea i don’t want to even try.

Same for consumers.

Check the docs:



Is it possible to get this data from mediasoup client directly? There were much more convenience statistics in mediasoup v2

Yeah, we can get so much on the server side and so little on the client… We want to avoid the need for having the permanent connection between server and client sides - they cause too many issues…

Statistics in mediasoup-client v2 were just server side Producer’s statistics pulled from the server via signaling, so exactly the same you can do in v3 via custom signaling.

In v2 everything depends on a permanent and bidirectional connection between client and server. In v3 it’s just the same. No idea which issues you mean, but this is just about having a typical WebSocket connection between client and server that you need to exchange real-time messages from one to each other.

Issues are with handling disconnections and reconnections of 2 separate things: webrtc and these websockets… Once you dive there, you encounter lots of cases where the system state becomes ambiguous and/or incoherent.

And how was this different in mediasoup v2?

We don’t care about signing (WebSocket) in mediasoup. That’s up to the application. BTW zero problems here correlating WebSocket and media.

Anyway, may I know what you are asking for? If you don’t want to pull data from the server via signaling, then check the local WebRTC stats from the client and inspect them. Then you’ll realize that, when simulcast is in use, Chrome just provides stats for a single stream and not 3).