onUserOffline property
void Function(RtcConnection connection, int remoteUid, UserOfflineReasonType reason)?
onUserOffline
final
Callback when a remote user (in communication) or host (in live streaming) leaves the current channel.
Users leave the channel for the following reasons: Normal departure: The remote user or host sends a 'goodbye' message and leaves the channel voluntarily. Timeout disconnection: No data packets are received from the user within a certain time (20 seconds in communication scenarios, slightly longer in live streaming), and the user is considered offline. In poor network conditions, false positives may occur. It is recommended to use the RTM SDK for reliable offline detection.
connectionConnection information. See RtcConnection.remoteUidThe ID of the remote user or host who went offline.reasonThe reason why the remote user (in communication) or host (in live streaming) went offline. See UserOfflineReasonType.
Implementation
final void Function(RtcConnection connection, int remoteUid,
UserOfflineReasonType reason)? onUserOffline;