How to get network quality of other publishers after joining?

So I implemented a network quality indicator using the networkQualityLevelChanged event, which works like a charm. However, there is one issue I can’t solve: This event is only fired when the network quality level changes - but what about publishers joining an already existing session?

Let’s say there are already two publishers in a session and a third one joins later. The third publisher will only get notified about network quality when the quality levels of the other publishers change. Since most connections are pretty stable or don’t change much, the third publisher will not see a network quality indicator because the networkQualityLevelChanged event is never fired.

How can I solve that? Is there a way to ask for the network quality level for all publishers?

Hello @plorenz-etes ,

I think you made a pretty good point. It is true that the networkQualityLevelChanged event only fires when the quality changes (obviously, as its name states), but that doesn’t necessarily mean that the information of the last network quality registered by a Publisher is not useful. As your use case proves, newly added participants won’t directly know which is the last quality reported by other publisher.

You can overcome this limitation right now quite easily: make every user publishing a Publisher object store its last network quality level, and whenever that user receives a new “connectionCreated” event (informaing about a new user that just connected to the session), send a signal to that specific new user (and only to that user) reporting the stored network quailty. This way every Publisher will be responsible of informing new users about their own network quality, and new users will always receive just after connecting to the session every network quality of every pre-existing Publisher of the session.

This solution does not detract from the fact that an API extension to automatically provide this information in some event after joining a session is not desirable. We will study the feasibility of this addition.

Best regards.

1 Like