Need help using Audio/Interest Groups.

Kaiz0kuKaiz0ku
edited August 2019 in Photon Voice
Hello everyone!

I am trying to create some sort of private voice chat feature.
Here is my logic :
1) Every player will be listening to group 0 (default - global) and another group that derives from his unique actor id.
2) When a player wants to say something privately to another, then he will simply switch to the target's group using the target's actor id.

So at any point in time all players can hear what everyone else is saying + private whispers.

In order to test that, I did the following. On one client on start I do the following :
myPhotonVoiceNetwork.GetComponent<PhotonVoiceNetwork>().Client.OpChangeGroups(null, new byte[1] { 3 });
(Now Client no 1 should be able to listen to both groups 0 and 3)

Then on the other client during runtime (within the Unity Editor) I change the Recorder's interest group to 3.
But it doesn't work. When the interest group is 3 the first client can not hear me anymore.

Any thoughts?

Comments

  • JohnTubeJohnTube mod
    edited August 2019
    Hi @Kaiz0ku,

    Thank you for choosing Photon!

    I'm also happy that you got the design and implementation figured out already.

    In case you missed it, we added a "DemoProximityVoiceChat" that makes use of Interest Groups in Photon Voice 2.9.

    Any thoughts?
    First of all, I would make sure that both clients are in the same room (same region, same AppId, same AppVersion, etc.). See PhotonVoiceNetwork's debug info in the custom inspector at the bottom.
    The second thing is: I would make sure the OpChangeGroups call is made when joined to the room and not before. Watch out for any error logs. Also, check the return value of the OpChangeGroups call.

    Unfortunately, there is no good feedback from the server about the success of OpChangeGroups (no operation response and no event). The client also can't query the list of the interest groups it's subscribed to or the list of all available interest groups from the server.

    For debugging purposes, you can change the interest group value or use byte[0]. You could make it possible to change groups from the Unity Editor directly.
Sign In or Register to comment.