How to Properly Toggle Mute/Unmute for All Players Using Photon Voice in Unity?

I’m working on a project using Photon PUN and Photon Voice in Unity. I want to implement a feature where pressing a button mutes all other players (so I can’t hear them), and pressing the button again unmutes them.

The goal is:

  • When the button is pressed, all players should be muted so their voice is no longer heard.
  • When the button is pressed again, they should be unmuted, allowing their voice to be heard again.

I’ve tried toggling the TransmitEnabled property of the players’ RecorderInUse, but it doesn’t seem to work as expected. Sometimes the players’ voice is still audible, or the muting/unmuting doesn’t happen correctly.

Is there a specific way to handle muting all players’ voices on a button press using Photon Voice? Any help or guidance would be appreciated!

The recorder’s TransmitEnabled affects the local user’s transmission. It is not meant to mute anyone else.

Each user’s stream has a speaker. On those, there is a mute setting, which just reduces the volume to 0.

If you expect users to mute others frequently, I would recommend using Interest Groups. If each user sends to some group, others can subscribe and unsubscribe from that group. If unsubscribed, they will not even receive the stream.