onRemoteAudioStateChanged property
void Function(RtcConnection connection, int remoteUid, RemoteAudioState state, RemoteAudioStateReason reason, int elapsed)?
onRemoteAudioStateChanged
final
远端音频流状态发生改变回调。
远端用户(通信场景)或主播(直播场景)的音频状态发生改变时,SDK 会触发该回调向本地用户报告当前的远端音频流状态。 频道内的用户(通信场景)或主播(直播场景)人数超过 32 人时,该回调可能不准确。
connectionConnection 信息。详见 RtcConnection 。remoteUid发生音频状态改变的远端用户 ID。state远端音频流状态,详见 RemoteAudioState 。reason远端音频流状态改变的具体原因,详见 RemoteAudioStateReason 。elapsed从本地用户调用 joinChannel 方法到发生本事件经历的时间,单位为毫秒。
Implementation
final void Function(
RtcConnection connection,
int remoteUid,
RemoteAudioState state,
RemoteAudioStateReason reason,
int elapsed)? onRemoteAudioStateChanged;