The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on Voice.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How to change volume of voice chat?

2022-11-11 20:30:31

Hi, I am looking to allow a player to adjust their voice chat volume using a volume slider, so other players in the scene will louder or quieter. I am also looking for a way to simultaneously mute all players in a scene. I was thinking I could just iterate through all the speakers in a scene to apply these settings, but the logic for this will get a little weird when new player join the scene. I feel like this question had to have been answered on this forum before, but I couldn't find anything. Any suggestions?


2022-11-14 09:49:37

Remote streams are played via AudioSource. Changing its volume is the easiest way to change the volume of the stream. Of course you can use anything that Unity audio subsystem provides, e.g. mixers.

Subscribe to VoiceConnection.SpeakerLinked event to adjust AudioSource's parameters right before playback starts. If you know the volume beforehand, you can set it in Editor.

Back to top