I’m testing the onConnectionChange event with the reactjs web app
I joined the session and received state:Connected
After that I turned off my wifi but no onConnectionChange event were fired
After 21 seconds I received state:Reconnecting
And just 1 second later I received state:Fail
After that I turned on my wifi but the screen still say “Session Disconnected,Try to reconnect”. It no longer able to reconnect to the session
I want to show the reconnecting… message immediately after user turn off wifi. But I didn’t recieve the event
How can I do that?
As I mentioned in this thread How to handle internet disconnection properly .
The Video SDK keeps a heart-beat connection with the server, but the messages are not sent every second. So the Reconnecting state cannot be triggered immediately and when the reconnecting event is triggered, the SDK will try to connect the server. If the network is unavailable for now, then it will return the Fail state and will not try to reconnect anymore.