onRemoteAudioStateChanged property
void Function(RtcConnection connection, int remoteUid, RemoteAudioState state, RemoteAudioStateReason reason, int elapsed)?
onRemoteAudioStateChanged
final
Occurs when the remote audio state changes. When the audio state of a remote user (in a voice/video call channel) or host (in a live streaming channel) changes, the SDK triggers this callback to report the current state of the remote audio stream.This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 17.
connectionThe connection information. See RtcConnection .remoteUidThe ID of the remote user whose audio state changes.stateThe state of the remote audio. See RemoteAudioState .reasonThe reason of the remote audio state change. See RemoteAudioStateReason .elapsedTime elapsed (ms) from the local user calling the joinChannel2/2method until the SDK triggers this callback.
Implementation
final void Function(
RtcConnection connection,
int remoteUid,
RemoteAudioState state,
RemoteAudioStateReason reason,
int elapsed)? onRemoteAudioStateChanged;