Detect network issues

Hello all,

We are developing our application using OpenVidu. On the subscriber side we use javascript browser API.
I am trying to solve the following issue:
When a subscriber has network problems, for example, he is disconnected from the internet,
stream freezes, and continues to do so indefinitely. In browser console I see failed websocket reconnect attempts.
What would be the best way to get notified about network problems to inform a subscriber? I didn’t find anything that could be used for that in OpenVidu API.

Thank you

Hello Markus,

You have some events triggered on the reconnection attempt, reconnection success and network disconnection. These are well documented here with code example how to catch and interpret them: https://docs.openvidu.io/en/2.15.0/advanced-features/automatic-reconnection/#reconnection-events

Cheers,
Mihail

Hello Mihail,

Thank you for pointing me to this part of the documentation. I’ve checked only reference documentation for browser API and there was only ‘sessionDisconnected’ event described.
‘reconnecting’ event is what I needed to inform a user about network problems.

Thank you,
Markus