Skip to main content

Voice chat in parties

Enabling voice chat in EOS parties is easy. Just set the bChatEnabled / "Chat Enabled" flag in the party configuration when creating the party, and the user will automatically join the voice chat room. When they leave the party, they will be disconnected from the voice chat room.

You can discover the name of the channel for later use with IVoiceChatUser by calling IVoiceChatUser::GetChannels().

Enabling voice chat in parties

For a more detailed example on creating a party and handling callbacks, refer to Creating a party. This example just shows how to enable chat on the party configuration before calling CreateParty:

TSharedRef<FPartyConfiguration> Config = MakeShared<FPartyConfiguration>();
Config->bIsAcceptingMembers = true;
Config->MaxMembers = 4; // The maximum number of players in the party.

// This line enables voice chat for the party.
Config->bChatEnabled = true;

if (!Party->CreateParty(
*Identity->GetUniquePlayerId(0).Get(), // The local player creating the party.
(FOnlinePartyTypeId)PartyTypeId, // The party type ID.
const FUniqueNetId &LocalUserId,
const TSharedPtr<const FOnlinePartyId> &PartyId,
const ECreatePartyCompletionResult Result)
// If Result == ECreatePartyCompletionResult::Succeeded, the party
// was created and you are now the party leader.
// Call didn't start, return error.