|
|
|
|
|
|
public void OnChannelJoined(IChannelSession channelSession) // Called after a connection is established, which begins once a lobby is joined.
|
|
|
|
{ |
|
|
|
//Check if we are muted or not
|
|
|
|
|
|
|
|
|
|
|
|
m_channelSession = channelSession; |
|
|
|
m_channelSession.Participants.AfterKeyAdded += OnParticipantAdded; |
|
|
|
m_channelSession.Participants.BeforeKeyRemoved += BeforeParticipantRemoved; |
|
|
|
|
|
|
var source = (VivoxUnity.IReadOnlyDictionary<string, IParticipant>)sender; |
|
|
|
var participant = source[keyEventArg.Key]; |
|
|
|
var username = participant.Account.DisplayName; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!participant.IsMutedForAll) |
|
|
|
m_lobbyUserVolumeUI.EnableVoice(false);//Should check if user is muted or not.
|
|
|
|
else |
|
|
|
|
|
|
m_lobbyUserVolumeUI.DisableVoice(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void BeforeParticipantRemoved(object sender, KeyEventArg<string> keyEventArg) |
|
|
|
{ |
|
|
|
var source = (VivoxUnity.IReadOnlyDictionary<string, IParticipant>)sender; |
|
|
|