opentok / opentok-react-native

OpenTok React Native - a library for OpenTok iOS and Android SDKs
https://tokbox.com/
MIT License
210 stars 155 forks source link

Stream destroyed event delays #685

Closed snikoletopoulos closed 10 months ago

snikoletopoulos commented 11 months ago

Bug Report

Current behavior When unmounting the <OTSession /> the stream is not destroyed until some time passes.

Steps to reproduce Mount a <OTSession /> Connect to a session from 2 devices Unmount <OTSession /> The other device is still displaying the react native subscriber

What is the expected correct behavior? When unmounting the <OTSession /> the stream should be destroyed from other clients instantly

Note In web, with OpenTok web components, when unmounting the video-publisher the streamDestroyed event is fired instantly at other clients

Update When unmounting the <OTPublisher /> component the event is fired instantly. We also tried calling session.current.disconnectSession() but it also is delayed for a few seconds

adamburton-boulder commented 11 months ago

I am seeing about 30 seconds between the time that the publisher emits the streamDestroyed event from opentok-react-native to when another client connected to the session receives that event.

vona-ben commented 11 months ago

Thank you, @snikoletopoulos, for providing the details. We have recently made some changes on the server side that may have affected the disconnection behaviour. We are currently working on resolving this issue, but as you mentioned, unpublishing the stream avoids this extra 30-second delay.

vona-ben commented 11 months ago

we expected a release for the native SDK this week and a fix for the React native app in the following week. Also, we can disable the reconnection feature in the meantime which should be a temporary fix (the down side is if the user will not reconnect if switching from wifi to 4G for example). For this, you can contact our support team.

GaryGiebler commented 10 months ago

We are still seeing this issue even after the 2.25.4 release for opentok-react-native. Has the issue been addressed in the opentok-react-native code?

vona-ben commented 10 months ago

Hi there,

Could you update to version 2.26.0 and let us know if you are experiencing the issue?

snikoletopoulos commented 10 months ago

Seems to be working fine now

Thank you!