기술 자료

지원

Vivox Unity SDK

Vivox Unity SDK

특정 사용자에 대해 다른 사용자 음소거

How to mute other users for a specific player.
읽는 시간 1분최근 업데이트: 19일 전

로컬 음소거를 사용하여 특정 사용자에 대해 다른 사용자를 음소거할 수 있습니다.
VivoxParticipant.MutePlayerLocally
함수를 사용하면 사용자가 음소거된 사용자의 소리를 듣지 못하지만, 채널의 다른 사용자는 여전히 음소거된 사용자의 소리를 들을 수 있습니다.
VivoxParticipant.UnmutePlayerLocally
를 사용하면 해당 사용자가 음소거된 사용자의 소리를 다시 들을 수 있습니다.
예를 들어 Cynthia, Fernando, Wang이 한 채널에 있습니다. Fernando는 Wang의 오디오를 듣고 싶지 않습니다. 로컬 음소거를 사용하면 Fernando가 Wang의 오디오를 듣지 않게 할 수 있습니다. 그러나 Cynthia는 Wang의 오디오를 계속 들으며 Wang은 Cynthia와 Fernando의 오디오를 계속 듣습니다. 이것은 VivoxParticipant 함수이므로 각 VivoxParticipant에 대한 개별 UI 표현을 처리하여 모두가 음소거 버튼을 갖도록 하는 것이 가장 좋습니다(채팅 채널 샘플과 참여 관리 페이지 참고). 다음 예제는
VivoxServices.Instance.ActiveChannels
참가자의 PlayerId와 채널의 ChannelName을 사용하여 딕셔너리로 특정 채널에서 특정 참가자를 찾고 음소거하거나 음소거 해제하는 방법을 보여 줍니다.
void MutePlayerLocally(string PlayerId, string ChannelName){ VivoxService.Instance.ActiveChannels[ChannelName].Where(participant => participant.PlayerId == PlayerId).First().MutePlayerLocally();}void UnmutePlayerLocally(string PlayerId, string ChannelName){ VivoxService.Instance.ActiveChannels[ChannelName].Where(participant => participant.PlayerId == PlayerId).First().UnmutePlayerLocally();}