Closed mzyisbest closed 23 hours ago
@mzyisbest This is due to system differences. When a user on the Android platform leaves, other users may receive the onUserOffline notification relatively slowly.
@guoxianzhe The callback hasn't been triggered yet, it's not slow
+1
@mzyisbest @liylmn Maybe triggers "timeout offline". If the user does not receive any data packets from the other party within a certain time frame (20 seconds for communication scenarios, slightly delayed for live scenarios), it is determined that the other party is offline. In case of poor network conditions, there is a possibility of false alarms. It is recommended to use the Netease Signaling SDK for reliable offline detection.
It seems the issue is due to the below code segment in internal/RtcEngineExInternal.ts
. If there is atleast one event handler of any type already registered, it does not register the other event handlers. So if there is event handler for onUserJoined
it will not register event handler for onUserOffline
.
if ( checkers.IRtcEngineEventHandler?.strictTest({ [eventType]: undefined }) ) { if (RtcEngineExInternal._event_handlers.length === 0) { this.registerEventHandler({}); } }
@premj-ekah This is not the registration of controlling IRtcEngineEventHandler. The registration of IRtcEngineEventHandler is done through _event_handlers. So, if you register onUserJoined
and onUserOffline
both, it still can trigger normally
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm on a call between ios and android. During the call, the ios side kills the process, and the other side's Android side has a callback onUserOffline. But when android kills the process, there is no callback on onUserOffline on the IOS side.