Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onUserOffline No callback triggered #786

Closed
mzyisbest opened this issue May 16, 2024 · 7 comments
Closed

onUserOffline No callback triggered #786

mzyisbest opened this issue May 16, 2024 · 7 comments

Comments

@mzyisbest
Copy link

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.

@guoxianzhe
Copy link
Contributor

@mzyisbest This is due to system differences. When a user on the Android platform leaves, other users may receive the onUserOffline notification relatively slowly.

@liylmn
Copy link

liylmn commented May 23, 2024

@guoxianzhe The callback hasn't been triggered yet, it's not slow

@mzyisbest
Copy link
Author

+1

@guoxianzhe
Copy link
Contributor

@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.

@premj-ekah
Copy link

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({});
}
}

@guoxianzhe
Copy link
Contributor

@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

Copy link

stale bot commented Aug 24, 2024

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.

@stale stale bot added the inactivity label Aug 24, 2024
@stale stale bot closed this as completed Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants