RevueSDK · Swift reference Guides

Instance Method

room(_:participant:didReceiveMuteRequest:)

收到遠端靜音請求

func room(_ room: Room, participant: RemoteParticipant, didReceiveMuteRequest isMuted: Bool)

Discussion

對方呼叫 remoteParticipant.requestMute(true) 時觸發。 SDK 只負責傳遞通知(能力層),是否配合由上層業務邏輯決定(授權層)。

func room(_ room: Room, participant: RemoteParticipant, didReceiveMuteRequest isMuted: Bool) {
    if shouldComply {
        Room.shared.localParticipant.setMicrophone(enabled: !isMuted)
    }
}