'Avoid hearing my own voice on PlayFab Party Voice Unity SDK with Photon - PUN 2

I have tested one user on Windows and the other on Android Device. I went away from my computer for making sure that my Laptop does not receive any audio. When I talk on my Android Device, I can hear my own voice and vice-versa. I think this makes echoes while on two applications I can hear my own voice.

How should I set the chat permission for that only the other persons on the same network can hear my voice?

Also if any player joins to a network that has already been created, let's say the fifth person joined for PlayFab Party Features, that fifth player calls "OnRemotePlayerJoined" callback for every other player in the same network.

(I am using Unity PlayFab SDK with Photon - PUN 2. And two players are in the same room and the same scene.)

Here is the OnRemotePlayerJoined function:

private void OnRemotePlayerJoined(object sender, PlayFabPlayer player)
{    
    SDK.PartyChatControlGetPermissions(PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle, player._chatControlHandle,
        out PARTY_CHAT_PERMISSION_OPTIONS options);
 
    options = PARTY_CHAT_PERMISSION_OPTIONS.PARTY_CHAT_PERMISSION_OPTIONS_SEND_AUDIO |
              PARTY_CHAT_PERMISSION_OPTIONS.PARTY_CHAT_PERMISSION_OPTIONS_RECEIVE_AUDIO;
    
    SDK.PartyChatControlSetPermissions(PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle, player._chatControlHandle,
        options);
}

Here is the OnNetworkJoined function:

private void OnNetworkJoined(object sender, string networkId)
{
    SDK.PartyChatControlSetAudioInput(PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle,
    PARTY_AUDIO_DEVICE_SELECTION_TYPE.PARTY_AUDIO_DEVICE_SELECTION_TYPE_SYSTEM_DEFAULT, null, null);
SDK.PartyChatControlSetAudioOutput(PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle,
    PARTY_AUDIO_DEVICE_SELECTION_TYPE.PARTY_AUDIO_DEVICE_SELECTION_TYPE_SYSTEM_DEFAULT, null, null);
 
SDK.PartyChatControlGetPermissions(PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle, null,
    out PARTY_CHAT_PERMISSION_OPTIONS options);
 
options = PARTY_CHAT_PERMISSION_OPTIONS.PARTY_CHAT_PERMISSION_OPTIONS_SEND_AUDIO |
          PARTY_CHAT_PERMISSION_OPTIONS.PARTY_CHAT_PERMISSION_OPTIONS_RECEIVE_AUDIO;
 
SDK.PartyChatControlSetPermissions(PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle, null,
    options);
}

If you have any additional info, please do not hesitate to ask.



Solution 1:[1]

In any case If you could not find it out, here is how I solved it:

Avoid hearing my own voice on PlayFab Party Voice Unity SDK with Photon - PUN 2

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DeathPro