# onConnectionChange event

**URL:** <https://devforum.zoom.us/t/onconnectionchange-event/69959>\
**Category:** Web\
**Created:** [June 4, 2022, 9:13am UTC](https://devforum.zoom.us/t/onconnectionchange-event/69959 "2022-06-04T09:13:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanh.huynh](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@thanh.huynh](https://devforum.zoom.us/u/thanh.huynh)\
**Post date:** [June 4, 2022, 9:13am UTC](https://devforum.zoom.us/t/onconnectionchange-event/69959/1 "2022-06-04T09:13:00Z")

</div>

Hi,

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?

Thank you!

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [June 6, 2022, 1:35am UTC](https://devforum.zoom.us/t/onconnectionchange-event/69959/2 "2022-06-06T01:35:23Z")

</div>

Hey @thanh.huynh

Thanks for your feedback.

As I mentioned in this thread [How to handle internet disconnection properly](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018) .  
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.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [June 7, 2022, 4:02am UTC](https://devforum.zoom.us/t/onconnectionchange-event/69959/3 "2022-06-07T04:02:56Z")

</div>

Hey @vic.yang ,  
Found few more issues:

1. When failover happens local user’s camera gets closed but `video-capturing-change` listener doesn’t return `Stopped` payload.
2. Seems like there is one spell mistake in `camera is closed` error it gets returned as `carmera is closed`.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [June 7, 2022, 4:16am UTC](https://devforum.zoom.us/t/onconnectionchange-event/69959/4 "2022-06-07T04:16:18Z")

</div>

Hey @shoaib

Thanks for reporting the issues to us.

We will fix these issues in the next release.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 7, 2022, 2:16pm UTC](https://devforum.zoom.us/t/onconnectionchange-event/69959/5 "2022-07-07T14:16:40Z")

</div>

Closed on July 7, 2022, 2:16pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
