question

Carradine avatar image
Carradine asked

Unity C# PlayFabPlayer.IsMuted Not Working correctly?

Hello! We are currently using PlayFab Multiplayer, and I attempted to implement the IsMuted value so that players could mute another player's chat and voice in a Lobby. However, when the client clicks a button to mute another player, what it does is mute the client itself from sending and receiving voice and chat instead, even though I set the value assigned to a different player.

I simply do something like this:

PlayFabPlayer player = GetPlayFabPlayerByID(memberList[lpMember].Id);


if ( player != null )

{ 

     player.IsMuted = !player.IsMuted;

}

What I am doing now is simply setting that player's voice level to 0 and that seems to work instead. So it is correctly finding the player to interact with as the changing the voice value works, but IsMuted does not.

However, we don't want to have voice and chat still on if people want to mute each other.

Am I missing something about the functionality of the IsMuted value?

Thanks!

multiplayer
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Carradine avatar image Carradine commented ·

Okay, I got a response from the Discord forums saying that a mute is actually a 2-way system. Not only does it mute the remote player, but it also mutes the client from sending message to that player as well. So it seems that is there is a lobby of only 2 people, and the client mute the remote player, then all voice and chat is disabled for both players.

0 Likes 0 ·

1 Answer

·
Rick Chen avatar image
Rick Chen answered

Quoting the answer from our expert in Discord:

If there are only 2 players, then yes, even if you mute the remote player, the local player will not send any audio to remote player, if you have 3 players and mute only 1 remote player, your local player should be able to send the audio to the 2nd player.

If you have tested for 3+ players that “IsMuted” to one remote player affects another remote player, please feel free to let us know.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.