ILoginSession
Reference the ILoginSession interface for user login and transmission management.
읽는 시간 14분최근 업데이트: 7달 전
An instance of an account that is signing in to the Vivox network.
#include <ILoginSession.h>Public Types
Name | |
|---|---|
| typedef FDelegateBeginLoginCompleted::FDelegate | FOnBeginLoginCompletedDelegate The delegate that is called when |
| typedef FDelegateBeginSetCrossMutedCommunicationsCompleted::FDelegate | FOnBeginSetCrossMutedCommunicationsCompletedDelegate The delegate to call when BeginSetCrossMutedCommunications completes. |
| typedef FDelegateBeginClearCrossMutedCommunicationsCompleted::FDelegate | FOnBeginClearCrossMutedCommunicationsCompletedDelegate The delegate to call when BeginClearCrossMutedCommunications completes. |
| typedef FDelegateBeginAddBlockedSubscriptionCompleted::FDelegate | FOnBeginAddBlockedSubscriptionCompletedDelegate The delegate to call when BeginAddBlockedSubscription completes. |
| typedef FDelegateBeginRemoveBlockedSubscriptionCompleted::FDelegate | FOnBeginRemoveBlockedSubscriptionCompletedDelegate The delegate to call when BeginRemoveBlockedSubscription completes. |
| typedef FDelegateBeginAddAllowedSubscriptionCompleted::FDelegate | FOnBeginAddAllowedSubscriptionCompletedDelegate The delegate to call when BeginAddAllowedSubscription completes. |
| typedef FDelegateBeginRemoveAllowedSubscriptionCompleted::FDelegate | FOnBeginRemoveAllowedSubscriptionCompletedDelegate The delegate to call when BeginRemoveAllowedSubscription completes. |
| typedef FDelegateBeginAddPresenceSubscriptionCompleted::FDelegate | FOnBeginAddPresenceSubscriptionCompletedDelegate The delegate to call when BeginAddPresenceSubscription completes. |
| typedef FDelegateBeginRemovePresenceSubscriptionCompleted::FDelegate | FOnBeginRemovePresenceSubscriptionCompletedDelegate The delegate to call when BeginRemovePresenceSubscription completes. |
| typedef FDelegateBeginSendSubscriptionReplyCompleted::FDelegate | FOnBeginSendSubscriptionReplyCompletedDelegate The delegate to call when BeginSendSubscriptionReply completes. |
| typedef FDelegateBeginSendDirectedMessageCompleted::FDelegate | FOnBeginSendDirectedMessageCompletedDelegate The delegate to call when BeginSendDirectedMessage completes. |
| typedef FDelegateBeginStartAudioInjectionCompleted::FDelegate | FOnBeginStartAudioInjectionCompletedDelegate The delegate to call when BeginStartAudioInjection completes. |
| typedef FDelegateBeginSetSafeVoiceConsentCompleted::FDelegate | FOnBeginSetSafeVoiceConsentCompletedDelegate |
| typedef FDelegateBeginGetSafeVoiceConsentCompleted::FDelegate | FOnBeginGetSafeVoiceConsentCompletedDelegate |
Public Functions
Name | |
|---|---|
| virtual const TMap< ChannelId, TSharedPtr< IChannelSession > > & | ChannelSessions() const =0 The list of channel sessions associated with this login session. |
| virtual const TMap< AccountId, TSharedPtr< IPresenceSubscription > > & | PresenceSubscriptions() const =0 The list of presence subscriptions associated with this login session. |
| virtual const TSet< AccountId > & | BlockedSubscriptions() const =0 The list of accounts blocked from seeing this account's online status. |
| virtual const TSet< AccountId > & | AllowedSubscriptions() const =0 The list of accounts allowed to see this account's online status. |
| virtual const TSet< AccountId > & | CrossMutedCommunications() const =0 The list of accounts which have bi-directionally muted communications with this login session. |
| virtual LoginState | State() const =0 The current state of this login session. |
| virtual const Presence & | CurrentPresence() =0 The online status that is sent to accounts that subscribe to the presence of this account. |
| virtual VivoxCoreError | SetCurrentPresence(const Presence & value) =0 Set this player's online status. |
| virtual const AccountId & | LoginSessionId() const =0 The unique identifier for this login session. |
| virtual VivoxCoreError | BeginLogin(const FString & server, const FString & accessToken, SubscriptionMode subscriptionMode, const TSet< AccountId > & presenceSubscriptions, const TSet< AccountId > & blockedPresenceSubscriptions, const TSet< AccountId > & allowedPresenceSubscriptions, FOnBeginLoginCompletedDelegate theDelegate =FOnBeginLoginCompletedDelegate()) =0 Begin the sign in process for this session with presence. |
| virtual VivoxCoreError | BeginLogin(const FString & server, const FString & accessToken, FOnBeginLoginCompletedDelegate theDelegate =FOnBeginLoginCompletedDelegate()) =0 Begin the sign in process for this session with no presence. |
| virtual IChannelSession & | GetChannelSession(const ChannelId & channelId) =0 Gets the channel session for this channelId. If necessary, this creates a channel session. |
| virtual void | DeleteChannelSession(const ChannelId & channelId) =0 Delete the channel session for this channelId, and disconnect the session if necessary. |
| virtual VivoxCoreError | BeginSetCrossMutedCommunications(const AccountId & accountId, const bool & muted, FOnBeginSetCrossMutedCommunicationsCompletedDelegate theDelegate) =0 Crossmute an AccountId, which bi-directionally mutes audio and text between that account and this login session. |
| virtual VivoxCoreError | BeginSetCrossMutedCommunications(const TSet< AccountId > & accountIdSet, const bool & muted, FOnBeginSetCrossMutedCommunicationsCompletedDelegate theDelegate) =0 Crossmute a set of AccountIds, which bi-directionally mutes audio and text between those accounts and this login session. |
| virtual VivoxCoreError | BeginClearCrossMutedCommunications(FOnBeginClearCrossMutedCommunicationsCompletedDelegate theDelegate) =0 Clear the bi-directionally muted communications list. This unmutes all AccountIds and allows audio and text through any means that are not otherwise prevented. |
| virtual VivoxCoreError | BeginAddBlockedSubscription(const AccountId & accountId, FOnBeginAddBlockedSubscriptionCompletedDelegate theDelegate =FOnBeginAddBlockedSubscriptionCompletedDelegate()) =0 Block incoming subscription requests from the specified account. |
| virtual VivoxCoreError | BeginRemoveBlockedSubscription(const AccountId & accountId, FOnBeginRemoveBlockedSubscriptionCompletedDelegate theDelegate =FOnBeginRemoveBlockedSubscriptionCompletedDelegate()) =0 Unblock incoming subscription requests from the specified account. Subscription requests from the specified account cause an event to be raised to the application. |
| virtual VivoxCoreError | BeginAddAllowedSubscription(const AccountId & accountId, FOnBeginAddAllowedSubscriptionCompletedDelegate theDelegate =FOnBeginAddAllowedSubscriptionCompletedDelegate()) =0 Allow incoming subscription requests from the specified account. |
| virtual VivoxCoreError | BeginRemoveAllowedSubscription(const AccountId & accountId, FOnBeginRemoveAllowedSubscriptionCompletedDelegate theDelegate =FOnBeginRemoveAllowedSubscriptionCompletedDelegate()) =0 Disallow automatic acceptance of incoming subscription requests from the specified account. Subscription requests from the specified account cause an event to be raised to the application. |
| virtual VivoxCoreError | BeginAddPresenceSubscription(const AccountId & accountId, FOnBeginAddPresenceSubscriptionCompletedDelegate theDelegate =FOnBeginAddPresenceSubscriptionCompletedDelegate()) =0 Subscribe to the specified account. |
| virtual VivoxCoreError | BeginRemovePresenceSubscription(const AccountId & accountId, FOnBeginRemovePresenceSubscriptionCompletedDelegate theDelegate =FOnBeginRemovePresenceSubscriptionCompletedDelegate()) =0 Unsubscribe from the specified account. |
| virtual VivoxCoreError | BeginSendSubscriptionReply(const AccountId & accountId, const SubscriptionReply & replyType, FOnBeginSendSubscriptionReplyCompletedDelegate theDelgate =FOnBeginSendSubscriptionReplyCompletedDelegate()) =0 Reply to a subscription request received from EventSubscriptionRequestReceived. |
| virtual VivoxCoreError | BeginSendDirectedMessage(const AccountId & accountId, const FString & language, const FString & message, const FString & applicationStanzaNamespace, const FString & applicationStanzaBody, FOnBeginSendDirectedMessageCompletedDelegate theDelegate =FOnBeginSendDirectedMessageCompletedDelegate()) =0 Send a message to a specific account. |
| virtual VivoxCoreError | BeginSendDirectedMessage(const AccountId & accountId, const FString & message, FOnBeginSendDirectedMessageCompletedDelegate theDelegate =FOnBeginSendDirectedMessageCompletedDelegate()) =0 Send a message to a specific account. |
| virtual VivoxCoreError | BeginStartAudioInjection(const FString & filePath, FOnBeginStartAudioInjectionCompletedDelegate theDelegate =FOnBeginStartAudioInjectionCompletedDelegate()) =0 Start broadcasting audio from a file to all connected ChannelSessions. |
| virtual VivoxCoreError | StopAudioInjection() =0 Stop broadcasting audio from a file. |
| virtual bool | IsAudioInjecting() =0 True if currently broadcasting audio from a file. |
| virtual VivoxCoreError | BeginSetSafeVoiceConsentStatus(const bool & consentToSet, const FString & environmentId, const FString & projectId, const FString & UASToken, FOnBeginSetSafeVoiceConsentCompletedDelegate theDelegate =FOnBeginSetSafeVoiceConsentCompletedDelegate()) =0 Sets the SafeVoice consent for the LoginSession. |
| virtual VivoxCoreError | BeginGetSafeVoiceConsentStatus(const FString & environmentId, const FString & projectId, const FString & UASToken, FOnBeginGetSafeVoiceConsentCompletedDelegate theDelegate =FOnBeginGetSafeVoiceConsentCompletedDelegate()) =0 Gets the SafeVoice consent for the LoginSession. |
| virtual VivoxCoreError | SetTransmissionMode(TransmissionMode mode, ChannelId singleChannel =ChannelId()) =0 Set whether microphone audio and injected audio should be transmitted to no channels, all channels, or a specific single channel. |
| virtual TransmissionMode | GetTransmissionMode() const =0 Get the transmission policy that is set for the player. |
| virtual TArray< ChannelId > | GetTransmittingChannels() const =0 Get the ChannelId of each channel that will broadcast non-muted microphone input and injected audio. |
| virtual VivoxCoreError | SetParticipantSpeakingUpdateRate(ParticipantSpeakingUpdateRate rate) =0 Set how often the SDK raises IChannelSession::EventAfterParticipantUpdated events that relate to speaking activity. |
| virtual ParticipantSpeakingUpdateRate | GetParticipantSpeakingUpdateRate() const =0 Get the frequency set for speech-related participant events for all participants in all connected channels. |
| virtual ITextToSpeech & | TTS() =0 The text-to-speech (TTS) subsystem instance associated with this login session. |
| virtual void | Logout() =0 Sign the account out of the Vivox system. Unlike in the case of an unexpected sign out due to loss of network connectivity, calling this method raises the EventStateChanged event with a value of LoginState::LoggingOut first, before raising a second event for LoginState::LoggedOut. |
| virtual FString | GetLoginToken(const FString & tokenSigningKey, FTimespan tokenExpirationDuration) const =0 Get a login token for this account. |
Public Attributes
Name | |
|---|---|
| SubscriptionRequestReceived | EventSubscriptionRequestReceived An event that indicates a new subscription request has been received. |
| DirectedTextMessageReceived | EventDirectedTextMessageReceived An event that indicates another player has sent you a text message. |
| StateChanged | EventStateChanged The event that raises when |
| ChannelJoined | EventChannelJoined The event that fires when a new ChannelSession is joined. |
| ChannelLeft | EventChannelLeft The event that fires when a ChannelSession is le. |
| SendDirectedTextMessageFailed | EventSendDirectedTextMessageFailed An event that indicates a directed message delivery failed. |
| AudioInjectionCompleted | EventAudioInjectionCompleted An event that indicates you are no longer injecting audio. |
Public Types Documentation
typedef FOnBeginLoginCompletedDelegate
typedef FDelegateBeginLoginCompleted::FDelegate ILoginSession::FOnBeginLoginCompletedDelegate;
The delegate that is called when completes.
BeginLogin()typedef FOnBeginSetCrossMutedCommunicationsCompletedDelegate
typedef FDelegateBeginSetCrossMutedCommunicationsCompleted::FDelegate ILoginSession::FOnBeginSetCrossMutedCommunicationsCompletedDelegate;
The delegate to call when BeginSetCrossMutedCommunications completes.
typedef FOnBeginClearCrossMutedCommunicationsCompletedDelegate
typedef FDelegateBeginClearCrossMutedCommunicationsCompleted::FDelegate ILoginSession::FOnBeginClearCrossMutedCommunicationsCompletedDelegate;
The delegate to call when BeginClearCrossMutedCommunications completes.
typedef FOnBeginAddBlockedSubscriptionCompletedDelegate
typedef FDelegateBeginAddBlockedSubscriptionCompleted::FDelegate ILoginSession::FOnBeginAddBlockedSubscriptionCompletedDelegate;
The delegate to call when BeginAddBlockedSubscription completes.
typedef FOnBeginRemoveBlockedSubscriptionCompletedDelegate
typedef FDelegateBeginRemoveBlockedSubscriptionCompleted::FDelegate ILoginSession::FOnBeginRemoveBlockedSubscriptionCompletedDelegate;
The delegate to call when BeginRemoveBlockedSubscription completes.
typedef FOnBeginAddAllowedSubscriptionCompletedDelegate
typedef FDelegateBeginAddAllowedSubscriptionCompleted::FDelegate ILoginSession::FOnBeginAddAllowedSubscriptionCompletedDelegate;
The delegate to call when BeginAddAllowedSubscription completes.
typedef FOnBeginRemoveAllowedSubscriptionCompletedDelegate
typedef FDelegateBeginRemoveAllowedSubscriptionCompleted::FDelegate ILoginSession::FOnBeginRemoveAllowedSubscriptionCompletedDelegate;
The delegate to call when BeginRemoveAllowedSubscription completes.
typedef FOnBeginAddPresenceSubscriptionCompletedDelegate
typedef FDelegateBeginAddPresenceSubscriptionCompleted::FDelegate ILoginSession::FOnBeginAddPresenceSubscriptionCompletedDelegate;
The delegate to call when BeginAddPresenceSubscription completes.
typedef FOnBeginRemovePresenceSubscriptionCompletedDelegate
typedef FDelegateBeginRemovePresenceSubscriptionCompleted::FDelegate ILoginSession::FOnBeginRemovePresenceSubscriptionCompletedDelegate;
The delegate to call when BeginRemovePresenceSubscription completes.
typedef FOnBeginSendSubscriptionReplyCompletedDelegate
typedef FDelegateBeginSendSubscriptionReplyCompleted::FDelegate ILoginSession::FOnBeginSendSubscriptionReplyCompletedDelegate;
The delegate to call when BeginSendSubscriptionReply completes.
typedef FOnBeginSendDirectedMessageCompletedDelegate
typedef FDelegateBeginSendDirectedMessageCompleted::FDelegate ILoginSession::FOnBeginSendDirectedMessageCompletedDelegate;
The delegate to call when BeginSendDirectedMessage completes.
Remark: The VivoxCoreError parameter is a status code for the request, and the FString parameter is a request ID unique to the directed message that is sent. If the message cannot be delivered to the intended recipient, then EventSendDirectedTextMessageFailed is raised with an error code and a matching request ID. You can compare this request ID with the ID returned by this delegate to determine which message failed to be delivered.
typedef FOnBeginStartAudioInjectionCompletedDelegate
typedef FDelegateBeginStartAudioInjectionCompleted::FDelegate ILoginSession::FOnBeginStartAudioInjectionCompletedDelegate;
The delegate to call when BeginStartAudioInjection completes.
typedef FOnBeginSetSafeVoiceConsentCompletedDelegate
typedef FDelegateBeginSetSafeVoiceConsentCompleted::FDelegate ILoginSession::FOnBeginSetSafeVoiceConsentCompletedDelegate;
typedef FOnBeginGetSafeVoiceConsentCompletedDelegate
typedef FDelegateBeginGetSafeVoiceConsentCompleted::FDelegate ILoginSession::FOnBeginGetSafeVoiceConsentCompletedDelegate;
Public Functions Documentation
function ChannelSessions
virtual const TMap< ChannelId, TSharedPtr< IChannelSession > > & ChannelSessions() const =0
The list of channel sessions associated with this login session.
function PresenceSubscriptions
virtual const TMap< AccountId, TSharedPtr< IPresenceSubscription > > & PresenceSubscriptions() const =0
The list of presence subscriptions associated with this login session.
Remark: This typically corresponds to a list of friends or followers.
function BlockedSubscriptions
virtual const TSet< AccountId > & BlockedSubscriptions() const =0
The list of accounts blocked from seeing this account's online status.
function AllowedSubscriptions
virtual const TSet< AccountId > & AllowedSubscriptions() const =0
The list of accounts allowed to see this account's online status.
function CrossMutedCommunications
virtual const TSet< AccountId > & CrossMutedCommunications() const =0
The list of accounts which have bi-directionally muted communications with this login session.
function State
virtual LoginState State() const =0
The current state of this login session.
function CurrentPresence
virtual const Presence & CurrentPresence() =0
The online status that is sent to accounts that subscribe to the presence of this account.
function SetCurrentPresence
virtual VivoxCoreError SetCurrentPresence( const Presence & value) =0
Set this player's online status.
function LoginSessionId
virtual const AccountId & LoginSessionId() const =0
The unique identifier for this login session.
function BeginLogin
virtual VivoxCoreError BeginLogin( const FString & server, const FString & accessToken, SubscriptionMode subscriptionMode, const TSet< AccountId > & presenceSubscriptions, const TSet< AccountId > & blockedPresenceSubscriptions, const TSet< AccountId > & allowedPresenceSubscriptions, FOnBeginLoginCompletedDelegate theDelegate =FOnBeginLoginCompletedDelegate()) =0
Begin the sign in process for this session with presence.
Parameters:
- server The URI of the Vivox instance assigned to you.
- accessToken An access token provided by your game server that enables the sign in process.
- subscriptionMode Determine how to handle incoming subscriptions (friend/follower requests).
- presenceSubscriptions A list of accounts for which this user wants to monitor online status.
- blockedPresenceSubscriptions A list of accounts that are not allowed to see this user's online status.
- allowedPresenceSubscriptions A list of accounts that are allowed to see this user's online status.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
Remark: Developers of games that do not have secure communications requirements can use GetLoginToken to generate the required access token.
function BeginLogin
virtual VivoxCoreError BeginLogin( const FString & server, const FString & accessToken, FOnBeginLoginCompletedDelegate theDelegate =FOnBeginLoginCompletedDelegate()) =0
Begin the sign in process for this session with no presence.
Parameters:
- server The URI of the Vivox instance assigned to you.
- accessToken An access token provided by your game server that enables the sign in process.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
Remark: Developers of games that do not have secure communications requirements can use GetLoginToken to generate the required access token.
function GetChannelSession
virtual IChannelSession & GetChannelSession( const ChannelId & channelId) =0
Gets the channel session for this channelId. If necessary, this creates a channel session.
Parameters:
- channelId The channel ID.
Return: The channel session.
function DeleteChannelSession
virtual void DeleteChannelSession( const ChannelId & channelId) =0
Delete the channel session for this channelId, and disconnect the session if necessary.
Parameters:
- channelId The channel ID.
Remark: For timing restrictions related to the process of joining or rejoining channels during a disconnect, see IChannelSession::Disconnect(). Note that there are no timing restrictions when using this method to remove a session which already has a ChannelState() of Disconnected.
function BeginSetCrossMutedCommunications
virtual VivoxCoreError BeginSetCrossMutedCommunications( const AccountId & accountId, const bool & muted, FOnBeginSetCrossMutedCommunicationsCompletedDelegate theDelegate) =0
Crossmute an AccountId, which bi-directionally mutes audio and text between that account and this login session.
Parameters:
- accountId The AccountId to bi-directionally mute or unmute.
- muted The status to set: true to mute, false to unmute.
Return: 0 on success.
function BeginSetCrossMutedCommunications
virtual VivoxCoreError BeginSetCrossMutedCommunications( const TSet< AccountId > & accountIdSet, const bool & muted, FOnBeginSetCrossMutedCommunicationsCompletedDelegate theDelegate) =0
Crossmute a set of AccountIds, which bi-directionally mutes audio and text between those accounts and this login session.
Parameters:
- accountIdSet The TSet of AccountIds to bi-directionally mute or unmute
- muted The status to set: true to mute, false to unmute.
Return: 0 on success.
function BeginClearCrossMutedCommunications
virtual VivoxCoreError BeginClearCrossMutedCommunications( FOnBeginClearCrossMutedCommunicationsCompletedDelegate theDelegate) =0
Clear the bi-directionally muted communications list. This unmutes all AccountIds and allows audio and text through any means that are not otherwise prevented.
Return: 0 on success.
function BeginAddBlockedSubscription
virtual VivoxCoreError BeginAddBlockedSubscription( const AccountId & accountId, FOnBeginAddBlockedSubscriptionCompletedDelegate theDelegate =FOnBeginAddBlockedSubscriptionCompletedDelegate()) =0
Block incoming subscription requests from the specified account.
Parameters:
- accountId The account ID to block.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
function BeginRemoveBlockedSubscription
virtual VivoxCoreError BeginRemoveBlockedSubscription( const AccountId & accountId, FOnBeginRemoveBlockedSubscriptionCompletedDelegate theDelegate =FOnBeginRemoveBlockedSubscriptionCompletedDelegate()) =0
Unblock incoming subscription requests from the specified account. Subscription requests from the specified account cause an event to be raised to the application.
Parameters:
- accountId The account ID to unblock.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
function BeginAddAllowedSubscription
virtual VivoxCoreError BeginAddAllowedSubscription( const AccountId & accountId, FOnBeginAddAllowedSubscriptionCompletedDelegate theDelegate =FOnBeginAddAllowedSubscriptionCompletedDelegate()) =0
Allow incoming subscription requests from the specified account.
Parameters:
- accountId The account ID to allow.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
function BeginRemoveAllowedSubscription
virtual VivoxCoreError BeginRemoveAllowedSubscription( const AccountId & accountId, FOnBeginRemoveAllowedSubscriptionCompletedDelegate theDelegate =FOnBeginRemoveAllowedSubscriptionCompletedDelegate()) =0
Disallow automatic acceptance of incoming subscription requests from the specified account. Subscription requests from the specified account cause an event to be raised to the application.
Parameters:
- accountId The account ID to disallow.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
function BeginAddPresenceSubscription
virtual VivoxCoreError BeginAddPresenceSubscription( const AccountId & accountId, FOnBeginAddPresenceSubscriptionCompletedDelegate theDelegate =FOnBeginAddPresenceSubscriptionCompletedDelegate()) =0
Subscribe to the specified account.
Parameters:
- accountId The account ID to subscribe to.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
Remark: This method automatically allows accountId to see the subscriber's online status.
function BeginRemovePresenceSubscription
virtual VivoxCoreError BeginRemovePresenceSubscription( const AccountId & accountId, FOnBeginRemovePresenceSubscriptionCompletedDelegate theDelegate =FOnBeginRemovePresenceSubscriptionCompletedDelegate()) =0
Unsubscribe from the specified account.
Parameters:
- accountId The account ID to subscribe to.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
function BeginSendSubscriptionReply
virtual VivoxCoreError BeginSendSubscriptionReply( const AccountId & accountId, const SubscriptionReply & replyType, FOnBeginSendSubscriptionReplyCompletedDelegate theDelgate =FOnBeginSendSubscriptionReplyCompletedDelegate()) =0
Reply to a subscription request received from EventSubscriptionRequestReceived.
Parameters:
- accountId The accountId to reply to.
- replyType The SubscriptionReply type to use: Allow or Block.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success.
function BeginSendDirectedMessage
virtual VivoxCoreError BeginSendDirectedMessage( const AccountId & accountId, const FString & language, const FString & message, const FString & applicationStanzaNamespace, const FString & applicationStanzaBody, FOnBeginSendDirectedMessageCompletedDelegate theDelegate =FOnBeginSendDirectedMessageCompletedDelegate()) =0
Send a message to a specific account.
Parameters:
- accountId The intended recipient of the message.
- language The language of the message, for example: "en". To use the default language ("en" for most systems), set this to null. This must conform to BCP 47 (https://tools.ietf.org/html/bcp47).
- message The body of the message.
- applicationStanzaNamespace An optional namespace element for additional application data.
- applicationStanzaBody The additional application data body.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success, or VxErrorInvalidOperation if BeginLogin was called with no presence enabled (short form).
function BeginSendDirectedMessage
virtual VivoxCoreError BeginSendDirectedMessage( const AccountId & accountId, const FString & message, FOnBeginSendDirectedMessageCompletedDelegate theDelegate =FOnBeginSendDirectedMessageCompletedDelegate()) =0
Send a message to a specific account.
Parameters:
- accountId The intended recipient of the message.
- message The body of the message.
- theDelegate A delegate to call when this operation completes.
Return: 0 on success, or VxErrorInvalidOperation if BeginLogin was called with no presence enabled (short form).
function BeginStartAudioInjection
virtual VivoxCoreError BeginStartAudioInjection( const FString & filePath, FOnBeginStartAudioInjectionCompletedDelegate theDelegate =FOnBeginStartAudioInjectionCompletedDelegate()) =0
Start broadcasting audio from a file to all connected ChannelSessions.
Parameters:
- filePath The full pathname for the .wav file to play (this must be single channel, 16-bit PCM).
- theDelegate A delegate to call when this operation completes.
Return: 0 on success, or VxErrorInvalidState if not in an audio-connected ChannelSession.
Remark: Injected audio is treated like a second microphone that you are speaking into. Muting or disconnecting your input device does not stop others from hearing the file audio. Muting yourself in a channel, stopping transmission to a channel, or disconnecting the channel AudioState does stop others from hearing the file audio.
function StopAudioInjection
virtual VivoxCoreError StopAudioInjection() =0
Stop broadcasting audio from a file.
function IsAudioInjecting
virtual bool IsAudioInjecting() =0
True if currently broadcasting audio from a file.
function BeginSetSafeVoiceConsentStatus
virtual VivoxCoreError BeginSetSafeVoiceConsentStatus( const bool & consentToSet, const FString & environmentId, const FString & projectId, const FString & UASToken, FOnBeginSetSafeVoiceConsentCompletedDelegate theDelegate =FOnBeginSetSafeVoiceConsentCompletedDelegate()) =0
Sets the SafeVoice consent for the LoginSession.
Parameters:
- consentToSet The SafeVoice consent status to update to
- environmentId The Unity Dashboard Environment Id
- projectId The Unity Dashboard Project Id
- UASToken The Authentication Token provided by the Unity Authentication Service. The Unity Authentication Service is most readily available through the Unity Gaming Services Unreal Plugin
- theDelegate The Delegate to handle once the SetSafeVoiceConsentStatus request is completed , which will contain the updated SafeVoice consent status
Remark: The Account Name for the LoginSession should be the PlayerId returned from signing into the Authentication Service to receive the UASToken
function BeginGetSafeVoiceConsentStatus
virtual VivoxCoreError BeginGetSafeVoiceConsentStatus( const FString & environmentId, const FString & projectId, const FString & UASToken, FOnBeginGetSafeVoiceConsentCompletedDelegate theDelegate =FOnBeginGetSafeVoiceConsentCompletedDelegate()) =0
Gets the SafeVoice consent for the LoginSession.
Parameters:
- environmentId The Unity Dashboard Environment Id
- projectId The Unity Dashboard Project Id
- UASToken The Authentication Token provided by the Unity Authentication Service. The Unity Authentication Service is most readily available through the Unity Gaming Services Unreal Plugin
- theDelegate The Delegate to handle once the SetSafeVoiceConsentStatus request is completed , which will contain the updated SafeVoice consent status
Remark: The Account Name for the LoginSession should be the PlayerId returned from signing into the Authentication Service to receive the UASToken
function SetTransmissionMode
virtual VivoxCoreError SetTransmissionMode( TransmissionMode mode, ChannelId singleChannel =ChannelId()) =0
Set whether microphone audio and injected audio should be transmitted to no channels, all channels, or a specific single channel.
Parameters:
- mode An enum that specifies a transmission policy.
- singleChannel The specific channel to transmit to when TransmissionMode::Single is set (this is otherwise ignored).
Return: VxErrorInvalidArgument if the mode is TransmissionMode::Single and the default or no ChannelId argument is provided.
Remark: Audio transmission changes take effect immediately in all channels this user is already connected to. The changes also affect future channels that are joined:
- None: Audio does not automatically transmit to new channels or to text-only channels when audio is added.
- All: Audio automatically transmits to new channels and to text-only channels when audio is added.
- Single: Audio only transmits into the specified channel, and does not automatically switch to new channels even if this channel is disconnected.
Important: You can override and change this setting by passing "true" for the switchTransmission argument in IChannelSession::BeginConnect() and IChannelSession::BeginSetAudioConnected().
function GetTransmissionMode
virtual TransmissionMode GetTransmissionMode() const =0
Get the transmission policy that is set for the player.
Return: The active TransmissionMode.
function GetTransmittingChannels
virtual TArray< ChannelId > GetTransmittingChannels() const =0
Get the ChannelId of each channel that will broadcast non-muted microphone input and injected audio.
Return: An array of transmitting ChannelIds.
function SetParticipantSpeakingUpdateRate
virtual VivoxCoreError SetParticipantSpeakingUpdateRate( ParticipantSpeakingUpdateRate rate) =0
Set how often the SDK raises IChannelSession::EventAfterParticipantUpdated events that relate to speaking activity.
Parameters:
- rate An enum that specifies the frequency of participant events due to changes in speech detection or audio energy.
Return: 0 on success
Remark: By default, the Vivox SDK supports a simple speaking/not-speaking indicator for channel participants; for this use case, keeping the default value of ParticipantSpeakingUpdateRate::StateChange is sufficient. If you want to create a dynamic voice activity indicator or other real-time visual representation of audio energy levels, supply this function with a ParticipantSpeakingUpdateRate value of Update1Hz, Update5Hz, or Update10Hz for updates of up to 1, 5, or 10 times per second as audio energy and other participant properties change. For more information, see the Vivox Unreal Developer Documentation.
function GetParticipantSpeakingUpdateRate
virtual ParticipantSpeakingUpdateRate GetParticipantSpeakingUpdateRate() const =0
Get the frequency set for speech-related participant events for all participants in all connected channels.
Return: The current ParticipantSpeakingUpdateRate.
function TTS
virtual ITextToSpeech & TTS() =0
The text-to-speech (TTS) subsystem instance associated with this login session.
function Logout
virtual void Logout() =0
Sign the account out of the Vivox system. Unlike in the case of an unexpected sign out due to loss of network connectivity, calling this method raises the EventStateChanged event with a value of LoginState::LoggingOut first, before raising a second event for LoginState::LoggedOut.
function GetLoginToken
virtual FString GetLoginToken( const FString & tokenSigningKey, FTimespan tokenExpirationDuration) const =0
Get a login token for this account.
Parameters:
- tokenSigningKey The key that corresponds to the issuer for this account that is used to sign the token.
- tokenExpirationDuration The length of time the token is valid for.
Return: An access token that can be used to sign in this account.
Remark: To be used only by applications without secure communications requirements.
Public Attributes Documentation
variable EventSubscriptionRequestReceived
SubscriptionRequestReceived EventSubscriptionRequestReceived;
An event that indicates a new subscription request has been received.
Remark: An example of this is when another player would like to be your buddy.
variable EventDirectedTextMessageReceived
DirectedTextMessageReceived EventDirectedTextMessageReceived;
An event that indicates another player has sent you a text message.
variable EventStateChanged
StateChanged EventStateChanged;
The event that raises when changes.
State()Remark: Loss of network connectivity raises this event with a value of LoginState::LoggedOut, without first transitioning through LoginState::LoggingOut.
variable EventChannelJoined
ChannelJoined EventChannelJoined;
The event that fires when a new ChannelSession is joined.
variable EventChannelLeft
ChannelLeft EventChannelLeft;
The event that fires when a ChannelSession is le.
variable EventSendDirectedTextMessageFailed
SendDirectedTextMessageFailed EventSendDirectedTextMessageFailed;
An event that indicates a directed message delivery failed.
Remark: The VivoxCoreError parameter specifies the reason for failure, and the FString parameter is a request ID that matches the ID returned in FOnBeginSendDirectedMessageCompletedDelegate when the message was sent. You can compare this request ID with the ID returned in the delegate to determine which directed message failed to be delivered.
variable EventAudioInjectionCompleted
AudioInjectionCompleted EventAudioInjectionCompleted;
An event that indicates you are no longer injecting audio.
Remark: This event is raised if injection is stopped early with StopAudioInjection() or if the file that you are injecting audio from has reached its natural end.