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.
connection
The connection information. See RtcConnection .remoteUid
The ID of the remote user whose audio state changes.state
The state of the remote audio. See RemoteAudioState .reason
The reason of the remote audio state change. See RemoteAudioStateReason .elapsed
Time elapsed (ms) from the local user calling the joinChannel2/2
method until the SDK triggers this callback.
Implementation
final void Function(
RtcConnection connection,
int remoteUid,
RemoteAudioState state,
RemoteAudioStateReason reason,
int elapsed)? onRemoteAudioStateChanged;