Documentation

Support

Vivox Unreal SDK

Vivox Unreal SDK

AccountId and ChannelId

Learn how AccountId and ChannelId changed in the upgrade.
Read time 2 minutesLast updated 2 days ago

Various functions in the VivoxVoiceChat module are replaced by functionality in AccountId and ChannelId. For more information about AccountId, see Sign in to a game. For more information about ChannelId, see Join a channel. The following list provides the name of the function in the VivoxVoiceChat module, the comparable function in VivoxCore, and supplemental information for completing a version switch.
  • CreateAccountName(const FString& PlayerName) is replaced by
    AccountId(const FString& issuer, const FString& name, const FString& domain, const TOptional<FString>& displayName, const TOptional<TArray<FString>>& spokenLanguages)
    • The
      VivoxClientApi::AccountName
      structure is replaced by the AccountId structure, and requires additional parameters to connect to the correct VivoxCore server. This is primarily the issuer and domain, although you can also add a DisplayName to display to other users and a list of SpokenLanguages.
  • GetPlayerNameFromAccountName(const VivoxClientApi::AccountName& AccountName)
    is replaced by
    Name()
    • Calling AccountId::Name() on the AccountId in question returns the FString Name that is stored within the AccountId.
  • CreateUserUri(const FString& PlayerName) is replaced by
    ToString(), AccountId(const FString& issuer, const FString& name, const FString& domain, const TOptional\<FString>& displayName, const TOptional\<TArray\<FString>>& spokenLanguages).ToString()
    • User URIs within VivoxCore are generated and handled entirely within the AccountId framework.
      • Create an AccountID from a URI by using
        AccountId::CreateFromUri(const FString& uri, const TOptional<FString>& displayName)
        .
      • Turn a constructed AccountID into a URI by calling
        ToString()
        .
  • GetPlayerNameFromUri(const VivoxClientApi::Uri& UserUri)
    is replaced by
    AccountNameFromUri(const FString &uri)
    • Because
      AccountId::AccountNameFromUri(const FString &uri)
      calls
      AccountId::CreateFromUri(const FString &uri).Name()
      , the most effective way to hold on to the AccountId as a whole is to use
      CreateFromUri(const FString &uri)
      , then store the result and call Name() on it.
  • CreateChannelUri(const FString& ChannelName, EVoiceChatChannelType ChannelType, TOptional<FVoiceChatChannel3dProperties> Channel3dProperties)
    is replaced by
    ChannelId(const FString& issuer, const FString& name, const FString& domain, ChannelType type, Channel3DProperties properties)
    • Similar to AccountIds, ChannelIds handle all of the static information storage for a channel, and is mostly comprised of all the aspects that make up a URI.
  • GetChannelNameFromUri(const VivoxClientApi::Uri& ChannelUri)
    is replaced by
    CreateFromUri(const FString& uri).Name()
    • To pull the name from a URI, convert the URI into a ChannelId by using ChannelId::CreateFromUri(const FString& uri), and then call Name() on the resulting ChannelId.
  • GetChannelTypeFromUri(const VivoxClientApi::Uri& ChannelUri)
    is replaced by
    CreateFromUri(const FString& uri).Type()
    • To pull the ChannelType from a URI, convert the URI into a ChannelId, and then call Type() on the resulting ChannelId.