onRemoteAudioStateChanged property

void Function(RtcConnection connection, int remoteUid, RemoteAudioState state, RemoteAudioStateReason reason, int elapsed)? onRemoteAudioStateChanged
final

Callback when the remote audio stream state changes.

When the audio state of a remote user (in communication) or host (in live streaming) changes, the SDK triggers this callback to report the current remote audio stream state to the local user. When there are more than 32 users (in communication) or hosts (in live streaming) in the channel, this callback may be inaccurate.

  • connection Connection information. See RtcConnection.
  • remoteUid User ID of the remote user whose audio state changed.
  • state Remote audio stream state. See RemoteAudioState.
  • reason Specific reason for the remote audio stream state change. See RemoteAudioStateReason.
  • elapsed Time elapsed (in milliseconds) from the local user calling the joinChannel method to the occurrence of this event.

Implementation

final void Function(
    RtcConnection connection,
    int remoteUid,
    RemoteAudioState state,
    RemoteAudioStateReason reason,
    int elapsed)? onRemoteAudioStateChanged;