Reconnect after transport connectionstate = failed

To understand the underlying issue, you will have to dig into server logs to see what is happening but most of the time if transport is getting failed it is because of the network conditions.

And if this is because of network conditions then the only thing you need to do is ‘restartIce’ like after every 10 seconds and when ‘connectionstatechange’ event tells you that it is connected then stop that restartIce process.

This is all so listen for this ‘connectionstatechange’ event, as mentioned by ibc, it should go to ‘connected’ state after successful restartIce:

One example is here: