Issues with automatic reconnecting

In the documentation, the following is stated:

  • If a participant disconnects for 0-7 seconds, the connection will fix itself
  • For cases with more than 12 seconds, the session will kick out the participant after the connection comes back

So, this works as expected, but disconnects with 7-12 seconds don’t seem to work the way documented:

In this case, the only solution is to renegotiate the whole media connections with OpenVidu. Clients will automatically do so: they analyze each one of the media connections that where established before the network dropped and for each one of them that is frozen, silently asks OpenVidu to fully recreate a new media connection, keeping the previous configuration. What clients perceive is that videos leave the frozen state and play again without having to do anything.

For testing this, I joined a session with a co-worker and disabled my internet connection for exactly 10 seconds. Afterwards, the websocket connection is re-established, i.e. I can receive events from the websocket, etc. However, the stream of my co-worker stays frozen forever and he also can’t see my stream which just stays black.
I can reliably reproduce this issue, so I went to the docs again and found out about the forceMediaReconnectionAfterNetworkDrop flag.

However, setting it like this only restores the incoming stream from my co-worker, but doesn’t restore my own stream which just stays frozen:

OV = new OpenVidu();
OV.setAdvancedConfiguration({forceMediaReconnectionAfterNetworkDrop: true});

Any ideas on what’s going wrong?

Hi,

Were you able to find any resolution for the re-connect issues? I am facing similar issues when the link on either end is bad then the vide turns to black screen (with wheel spinning) and no auto re-connect.

Thanks and regards,