How to get the current groups that the players are subscribed and listening in Photon Voice 2

I use PhotonVoiceNetwork.Instance.Client.OpChangeGroups(null, ListenGroups); how to add or remove groups. This returns a bool. I want to get the Byte Array that the player currently listening to.

Best Answers

  • Tobias
    Tobias admin
    Accepted Answer
    You likely have to store this list somewhere yourself. The API does not cache this list client side, as far as I remember.
  • JohnTube
    JohnTube mod
    Accepted Answer
    Hi @lightps0607,

    Thank you for choosing Photon!

    The LoadBalancing API itself (a.k.a. Photon Realtime, Photon Voice is built on top) and the server do not provide a way to query or poll which groups you're subscribed to.
    As @Tobias also mentioned the client does not cache the list also.

    However you can easily add this yourself, we're doing this in ProximityVoiceTrigger (subscribedGroups field) ("Assets/Photon/PhotonVoice/Demos/DemoProximityVoiceChat/Scripts/ProximityVoiceTrigger.cs").

Answers

  • Tobias
    Tobias admin
    Accepted Answer
    You likely have to store this list somewhere yourself. The API does not cache this list client side, as far as I remember.
  • JohnTube
    JohnTube mod
    Accepted Answer
    Hi @lightps0607,

    Thank you for choosing Photon!

    The LoadBalancing API itself (a.k.a. Photon Realtime, Photon Voice is built on top) and the server do not provide a way to query or poll which groups you're subscribed to.
    As @Tobias also mentioned the client does not cache the list also.

    However you can easily add this yourself, we're doing this in ProximityVoiceTrigger (subscribedGroups field) ("Assets/Photon/PhotonVoice/Demos/DemoProximityVoiceChat/Scripts/ProximityVoiceTrigger.cs").
  • Thanks a lot @Tobias and @JohnTube .