v16.3.0
Latest
2020.3+

Interface IVivoxService

The interface used to interact with the VivoxService

Namespace: Unity.Services.Vivox
Syntax
public interface IVivoxService

Properties

ActiveChannels

A Dictionary of channels the user is currently connected to and a list of the VivoxParticipants in each the channel. The key is the channel name used to connect with. The value is a maintained list of each VivoxParticipant in the channel.

Declaration
ReadOnlyDictionary<string, ReadOnlyCollection<VivoxParticipant>> ActiveChannels { get; }
Property Value
TypeDescription
ReadOnlyDictionary<String, ReadOnlyCollection<VivoxParticipant>>

ActiveInputDevice

The active input device being used by the local user.

Declaration
VivoxInputDevice ActiveInputDevice { get; }
Property Value
TypeDescription
VivoxInputDevice

ActiveOutputDevice

The active output device being used by the local user.

Declaration
VivoxOutputDevice ActiveOutputDevice { get; }
Property Value
TypeDescription
VivoxOutputDevice

AvailableInputDevices

A collection of all available input devices for the local user.

Declaration
ReadOnlyCollection<VivoxInputDevice> AvailableInputDevices { get; }
Property Value
TypeDescription
ReadOnlyCollection<VivoxInputDevice>

AvailableOutputDevices

A collection of all available output devices for the local user.

Declaration
ReadOnlyCollection<VivoxOutputDevice> AvailableOutputDevices { get; }
Property Value
TypeDescription
ReadOnlyCollection<VivoxOutputDevice>

EffectiveInputDevice

The real active input device being used by the local user. If the active input device that's in-use is a specific device, the value provided will match the ActiveInputDevice If the active input device is a virtual device such as default system device then this will provide the name of the underlying input device being used.

Declaration
VivoxInputDevice EffectiveInputDevice { get; }
Property Value
TypeDescription
VivoxInputDevice

EffectiveOutputDevice

The real active output device being used by the local user. If the active output device that's in-use is a specific device, the value provided will match the ActiveOutputDevice If the active output device is a virtual device such as default system device then this will provide the name of the underlying output device being used.

Declaration
VivoxOutputDevice EffectiveOutputDevice { get; }
Property Value
TypeDescription
VivoxOutputDevice

InputDeviceVolume

The volume of your input.

Declaration
int InputDeviceVolume { get; }
Property Value
TypeDescription
Int32

IsAudioEchoCancellationEnabled

Indicates whether Vivox's software echo cancellation feature is enabled. Note: This is completely independent of any hardware-provided acoustic echo cancellation that might be available for a device.

Declaration
bool IsAudioEchoCancellationEnabled { get; }
Property Value
TypeDescription
Boolean

IsInjectingAudio

Indicates whether audio is being injected or not.

Declaration
bool IsInjectingAudio { get; }
Property Value
TypeDescription
Boolean

IsInputDeviceMuted

Indicates if input devices are muted.

Declaration
bool IsInputDeviceMuted { get; }
Property Value
TypeDescription
Boolean

IsLoggedIn

Checks whether the user is logged in.

Declaration
bool IsLoggedIn { get; }
Property Value
TypeDescription
Boolean

IsOutputDeviceMuted

Indicates if output devices are muted.

Declaration
bool IsOutputDeviceMuted { get; }
Property Value
TypeDescription
Boolean

OutputDeviceVolume

The volume of your output.

Declaration
int OutputDeviceVolume { get; }
Property Value
TypeDescription
Int32

SignedInPlayerId

Declaration
string SignedInPlayerId { get; }
Property Value
TypeDescription
String

TextToSpeechAvailableVoices

A collection of all available voice profiles that can be used with text-to-speech. These values within can be used to set the current voice profile when provided to TextToSpeechSetVoice(String).

Declaration
ReadOnlyCollection<string> TextToSpeechAvailableVoices { get; }
Property Value
TypeDescription
ReadOnlyCollection<String>

TextToSpeechCurrentVoice

The name of the current voice being used when playback of a message occurs.

Declaration
string TextToSpeechCurrentVoice { get; }
Property Value
TypeDescription
String

TransmittingChannels

A collection of all channels that are transmitting. If the current transmission mode is set to Single, this will only show a single transmitting channel.

Declaration
ReadOnlyCollection<string> TransmittingChannels { get; }
Property Value
TypeDescription
ReadOnlyCollection<String>

Methods

BlockPlayerAsync(String)

"Block" a player, bidirectionally muting audio/text between that player and the local user.

Declaration
Task BlockPlayerAsync(string playerId)
Parameters
TypeNameDescription
StringplayerId

The PlayerId to bidirectionally mute or unmute

Returns
TypeDescription
Task

Task for the operation

DeleteChannelTextMessageAsync(String, String)

Deletes an already sent message in a Channel.

Declaration
Task DeleteChannelTextMessageAsync(string channelName, string messageId)
Parameters
TypeNameDescription
StringchannelName

The name of the channel for the message to be deleted.

StringmessageId

The messageId of the message sent that you would like to delete.

Returns
TypeDescription
Task

Task for the operation

DeleteDirectTextMessageAsync(String)

Deletes an already sent message in a Direct Message.

Declaration
Task DeleteDirectTextMessageAsync(string messageId)
Parameters
TypeNameDescription
StringmessageId

The messageId of the message sent that you would like to delete.

Returns
TypeDescription
Task

Task for the operation

DisableAcousticEchoCancellation()

Disables Vivox's acoustic echo cancellation feature.

Declaration
void DisableAcousticEchoCancellation()

DisableAutoVoiceActivityDetectionAsync()

Disables automatic voice activity detection. Must be logged in to perform this action.

Declaration
Task DisableAutoVoiceActivityDetectionAsync()
Returns
TypeDescription
Task

Task for the operation

EditChannelTextMessageAsync(String, String, String)

Edits an already sent message in a Channel.

Declaration
Task EditChannelTextMessageAsync(string channelName, string messageId, string newMessage)
Parameters
TypeNameDescription
StringchannelName

The name of the channel for the message to be edited.

StringmessageId

The messageId of the message sent that you would like to edit.

StringnewMessage

The new text of the message to be edited.

Returns
TypeDescription
Task

Task for the operation

EditDirectTextMessageAsync(String, String)

Edits an already sent message in a Direct Message.

Declaration
Task EditDirectTextMessageAsync(string messageId, string newMessage)
Parameters
TypeNameDescription
StringmessageId

The messageId of the message sent that you would like to edit.

StringnewMessage

The new text of the message to be edited.

Returns
TypeDescription
Task

Task for the operation

EnableAcousticEchoCancellation()

Enables Vivox's acoustic echo cancellation feature.

Declaration
void EnableAcousticEchoCancellation()

EnableAutoVoiceActivityDetectionAsync()

Enables automatic configuration of voice activity detection properties by the SDK. If Automatic Voice Activity Detection is enabled, the properties set in SetVoiceActivityDetectionPropertiesAsync(Int32, Int32, Int32) will have no effect. Must be logged in to perform this action.

Declaration
Task EnableAutoVoiceActivityDetectionAsync()
Returns
TypeDescription
Task

Task for the operation

GetChannelTextMessageHistoryAsync(String, Int32, ChatHistoryQueryOptions)

Fetch Channel Text Messages for a given channel. Use ChatHistoryQueryOptions to filter what is returned.

Declaration
Task<ReadOnlyCollection<VivoxMessage>> GetChannelTextMessageHistoryAsync(string channelName, int requestSize = 10, ChatHistoryQueryOptions chatHistoryQueryOptions = null)
Parameters
TypeNameDescription
StringchannelName

The name of the channel the history will be fetched from.

Int32requestSize

The maximum number of messages to return. The larger this value is the longer the query will take to complete. Default is 10, keeping this number low is ideal.

ChatHistoryQueryOptionschatHistoryQueryOptions

ChatHistoryQueryOptions is used to customize the history results returned.

Returns
TypeDescription
Task<ReadOnlyCollection<VivoxMessage>>

Task with the ReadOnlyCollection of VivoxMessage

GetConversationsAsync(ConversationQueryOptions)

Provides a collection of VivoxConversation objects representing conversations that the locally signed-in user has participated in. This can return a combination of channel conversations and directed message conversations. The VivoxConversation objects provided can be used to distinguish between the different ConversationType types.

Declaration
Task<ReadOnlyCollection<VivoxConversation>> GetConversationsAsync(ConversationQueryOptions options = null)
Parameters
TypeNameDescription
ConversationQueryOptionsoptions

Configuration used to tailor the results of the query.

Returns
TypeDescription
Task<ReadOnlyCollection<VivoxConversation>>

Task with the ReadOnlyCollection of VivoxConversations

GetDirectTextMessageHistoryAsync(String, Int32, ChatHistoryQueryOptions)

Fetch Direct Text Messages at an account level. Use ChatHistoryQueryOptions to filter what is returned.

Declaration
Task<ReadOnlyCollection<VivoxMessage>> GetDirectTextMessageHistoryAsync(string playerId = null, int requestSize = 10, ChatHistoryQueryOptions chatHistoryQueryOptions = null)
Parameters
TypeNameDescription
StringplayerId

The playerId of the logged in user you would like to search the chat history of. If this value is set then it takes priority over the ChatHistoryQueryOptions value for PlayerId and it will be ignored. Otherwise that PlayerId will be used in the ChatHistoryQueryOptions PlayerId is used.

Int32requestSize

The maximum number of messages to return. The larger this value is the longer the query will take to complete. Default is 10, keeping this number low is ideal.

ChatHistoryQueryOptionschatHistoryQueryOptions

ChatHistoryQueryOptions is used to customize the history results returned.

Returns
TypeDescription
Task<ReadOnlyCollection<VivoxMessage>>

Task with the ReadOnlyCollection of VivoxMessage

InitializeAsync(VivoxConfigurationOptions)

Initializes the Client object which will enable a user to login and check/manage audio devices.

Declaration
Task InitializeAsync(VivoxConfigurationOptions options = null)
Parameters
TypeNameDescription
VivoxConfigurationOptionsoptions

The VivoxConfigurationOptions used to initialize the Vivox Service, controlling advanced audio settings and other controls like logging

Returns
TypeDescription
Task

a Task associated with the Vivox Initialization

IsSpeechToTextEnabled(String)

Indicates if Speech-to-Text transcription is enabled for a specific channel.

Declaration
bool IsSpeechToTextEnabled(string channelName)
Parameters
TypeNameDescription
StringchannelName

The name of the channel used to check wether the transcription is enabled.

Returns
TypeDescription
Boolean

Whether or not Speech-to-Text transcription is enabled for the specified channel.

JoinEchoChannelAsync(String, ChatCapability, ChannelOptions)

Puts the user in an echo channel using channelName as the unique identifier. In this channel you will hear only your own voice played back at you. If you are not logged into the Vivox service when this is called, you will be automatically logged in.

Declaration
Task JoinEchoChannelAsync(string channelName, ChatCapability chatCapability, ChannelOptions channelOptions = null)
Parameters
TypeNameDescription
StringchannelName

A unique identifier for the channel.

ChatCapabilitychatCapability

Used to indicate what type of capabilities the user wants when joining a channel.

ChannelOptionschannelOptions

General channel configuration options to be used when joining the channel.

Returns
TypeDescription
Task

Task for the operation

JoinGroupChannelAsync(String, ChatCapability, ChannelOptions)

Puts the user in a 2-D group channel using channelName as the unique identifier. This channel type is similar to a traditional non-positional voice call. If you are not logged into the Vivox service when this is called, you will be automatically logged in.

Declaration
Task JoinGroupChannelAsync(string channelName, ChatCapability chatCapability, ChannelOptions channelOptions = null)
Parameters
TypeNameDescription
StringchannelName

A unique identifier for the channel.

ChatCapabilitychatCapability

Used to indicate what type of capabilities the user wants when joining a channel.

ChannelOptionschannelOptions

General channel configuration options to be used when joining the channel.

Returns
TypeDescription
Task

Task for the operation

JoinPositionalChannelAsync(String, ChatCapability, Channel3DProperties, ChannelOptions)

Puts the user in a 3-D/positional group channel using channelName as the unique identifier. This channel type is similar to having a conversation in-person involving nuances such as audio attenutation and falloff. The features of a positional channel can be configured by using the Channel3DProperties class. See this class for an in-depth explanation of these features. If you are not logged into the Vivox service when this is called, you will be automatically logged in.

Declaration
Task JoinPositionalChannelAsync(string channelName, ChatCapability chatCapability, Channel3DProperties positionalChannelProperties, ChannelOptions channelOptions = null)
Parameters
TypeNameDescription
StringchannelName

A unique identifier for the channel.

ChatCapabilitychatCapability

Used to indicate what type of capabilities the user wants when joining a channel.

Channel3DPropertiespositionalChannelProperties

Configuration properties for a 3-D/positional channel.

ChannelOptionschannelOptions

General channel configuration options to be used when joining the channel.

Returns
TypeDescription
Task

Task for the operation

LeaveAllChannelsAsync()

Leaves all channels the currently logged in user is connected to, removing the user from text and voice for those channels.

Declaration
Task LeaveAllChannelsAsync()
Returns
TypeDescription
Task

Task for the operation

LeaveChannelAsync(String)

Leaves a specific channel, removing the user from text and voice for that channel.

Declaration
Task LeaveChannelAsync(string channelName)
Parameters
TypeNameDescription
StringchannelName

The unique identifier of the channel that should be left

Returns
TypeDescription
Task

Task for the operation

LoginAsync(LoginOptions)

Logs into the Vivox Service, enabling Vivox to perform actions like joining channels or sending directed messages.

Declaration
Task LoginAsync(LoginOptions options = null)
Parameters
TypeNameDescription
LoginOptionsoptions

The LoginOptions to be used to create an account with a display name, and set more complex behaviour like always transmitting to new channels or allowing Text to Speech

Returns
TypeDescription
Task

Task for the operation

LogoutAsync()

Logs out of the Vivox Service.

Declaration
Task LogoutAsync()
Returns
TypeDescription
Task

a Task associated with the Vivox Logout

MuteInputDevice()

Mutes the local user's input devices preventing the transmission of audio from any local input device.

Declaration
void MuteInputDevice()

MuteOutputDevice()

Mutes the local user's output devices preventing them from hearing incoming audio from any local output device.

Declaration
void MuteOutputDevice()

SendChannelTextMessageAsync(String, String, MessageOptions)

Sends a text message to a channel the user is connected to.

Declaration
Task SendChannelTextMessageAsync(string channelName, string message, MessageOptions options = null)
Parameters
TypeNameDescription
StringchannelName

The name of the channel the message will be sent to.

Stringmessage

The text of the message to be sent.

MessageOptionsoptions

An optional parameter for adding metadata to the message

Returns
TypeDescription
Task

Task for the operation

SendDirectTextMessageAsync(String, String, MessageOptions)

Sends a text message to another logged in user.

Declaration
Task SendDirectTextMessageAsync(string playerId, string message, MessageOptions options = null)
Parameters
TypeNameDescription
StringplayerId

The playerId of the logged in user the message will be sent to.

Stringmessage

The text of the message to be sent.

MessageOptionsoptions

An optional parameter for adding metadata to the message

Returns
TypeDescription
Task

Task for the operation

Set3DPosition(GameObject, String, Boolean)

Set the location of the local user for a specific positonail channel. Note: This version of Set3DPosition will use the same position for the user's "ears" and "mouth", making a slightly less accurate version of positional audio.

Declaration
void Set3DPosition(GameObject participantObject, string channelName, bool allowPanning = true)
Parameters
TypeNameDescription
UnityEngine.GameObjectparticipantObject

The position of the GameObject meant to represent the player

StringchannelName

The name of the specific positional channel to update the position in. Must be a positional channel.

BooleanallowPanning

Manages audio panning (audio shifting between left and right ears). Panning is enabled by default but will be disabled if set to false

Set3DPosition(Vector3, Vector3, Vector3, Vector3, String, Boolean)

Set the location of the local user for a specific positional channel.

Declaration
void Set3DPosition(Vector3 speakerPos, Vector3 listenerPos, Vector3 listenerAtOrient, Vector3 listenerUpOrient, string channelName, bool allowPanning = true)
Parameters
TypeNameDescription
UnityEngine.Vector3speakerPos

The position of the virtual "mouth."

UnityEngine.Vector3listenerPos

The position of the virtual "ear."

UnityEngine.Vector3listenerAtOrient

A unit vector that represents the forward (Z) direction, or heading, of the listener.

UnityEngine.Vector3listenerUpOrient

A unit vector that represents the up (Y) direction of the listener. Use Vector3(0, 1, 0) for a "global" up in the world space.

StringchannelName

The name of the specific positional channel to update the position in. Must be a positional channel.

BooleanallowPanning

Manages audio panning (audio shifting between left and right ears). Panning is enabled by default but will be disabled if set to false

SetActiveInputDeviceAsync(VivoxInputDevice)

Sets the specified input device as the active input device for the local user.

Declaration
Task SetActiveInputDeviceAsync(VivoxInputDevice device)
Parameters
TypeNameDescription
VivoxInputDevicedevice

The device to make the active input device.

Returns
TypeDescription
Task

Task for the operation

SetActiveOutputDeviceAsync(VivoxOutputDevice)

Sets the specified output device as the active output device for the local user.

Declaration
Task SetActiveOutputDeviceAsync(VivoxOutputDevice device)
Parameters
TypeNameDescription
VivoxOutputDevicedevice

The device to make the active output device.

Returns
TypeDescription
Task

Task for the operation

SetChannelTransmissionModeAsync(TransmissionMode, String)

Changes the channel the local user is currently transmitting into. Options of transmission are all channels, no channels, or a single channel. If you are specifying a single channel, the channelName parameter is mandatory.

Declaration
Task SetChannelTransmissionModeAsync(TransmissionMode transmissionMode, string channelName = null)
Parameters
TypeNameDescription
TransmissionModetransmissionMode

The type of transmission policy to use.

StringchannelName

Name of the individual channel to transmit to. Mandatory when opting to transmit to a single channel.

Returns
TypeDescription
Task

Task for the operation

SetChannelVolumeAsync(String, Int32)

Sets the volume of an entire channel for the local user. This will adjust the volume of player audio for all players in a channel for the local user. Volume value is clamped between -50 and 50 with a default of 0.

Declaration
Task SetChannelVolumeAsync(string channelName, int value)
Parameters
TypeNameDescription
StringchannelName

The name of the channel to set the volume value for

Int32value

Volume value to be used - clamped between -50 and 50 with a default value of 0

Returns
TypeDescription
Task

Task for the operation

SetInputDeviceVolume(Int32)

Sets the input device volume for the local user. This applies to all active audio sessions. Volume value is clamped between -50 and 50 with a default of 0.

Declaration
void SetInputDeviceVolume(int value)
Parameters
TypeNameDescription
Int32value

Volume value to be used - clamped between -50 and 50 with a default value of 0

SetMessageAsReadAsync(VivoxMessage, Nullable<DateTime>)

Declaration
Task SetMessageAsReadAsync(VivoxMessage message, DateTime? seenAt = null)
Parameters
TypeNameDescription
VivoxMessagemessage
Nullable<DateTime>seenAt
Returns
TypeDescription
Task

SetOutputDeviceVolume(Int32)

Sets the output device volume for the local user. This applies to all active audio sessions. Volume value is clamped between -50 and 50 with a default of 0.

Declaration
void SetOutputDeviceVolume(int value)
Parameters
TypeNameDescription
Int32value

Volume value to be used - clamped between -50 and 50 with a default value of 0

SetTokenProvider(IVivoxTokenProvider)

Registers an IVivoxTokenProvider implementation that will be used to vend tokens for Vivox actions. Must be called before initializing the Vivox Service.

Declaration
void SetTokenProvider(IVivoxTokenProvider tokenProvider)
Parameters
TypeNameDescription
IVivoxTokenProvidertokenProvider

Token Provider to override default Token Provider with

SetVoiceActivityDetectionPropertiesAsync(Int32, Int32, Int32)

Sets voice activity detection parameters. Parameters will be defaulted to their original default value if not provided. Call this with no parameters provided if you wish to reset the VAD settings. It is recommended to cache the settings and apply all of them each time this method is called. Must be logged in to perform this action.

Declaration
Task SetVoiceActivityDetectionPropertiesAsync(int hangover = 2000, int noiseFloor = 576, int sensitivity = 43)
Parameters
TypeNameDescription
Int32hangover

The hangover time is the time (in milliseconds) it takes for the VAD to switch back from speech mode to silence after the last speech frame is detected. The default value is 2000.

Int32noiseFloor

The noise floor is a dimensionless value between 0 and 20000 that controls how the VAD separates speech from background noise. Lower values assume the user is in a quieter environment where the audio is only speech. Higher values assume a noisy background environment.The default value is 576.

Note: Changes to the VAD noiseFloor settings do not affect currently joined channels. If the ability to change VAD settings is available to the end-user, indicate that noiseFloor changes only take effect in the next voice session or only allow changing the noiseFloor when the client is not in a channel.

Int32sensitivity

The sensitivity is a dimensionless value between 0 and 100 that indicates the sensitivity of the VAD. Increasing this value corresponds to decreasing the sensitivity of the VAD (0 is the most sensitive, and 100 is the least sensitive). Higher values of sensitivity require louder audio to trigger the VAD. The default value is 43.

Returns
TypeDescription
Task

Task for the operation

SpeechToTextDisableTranscription(String)

Disables the speech-to-text audio transcription inside a channel.

Declaration
Task SpeechToTextDisableTranscription(string channelName)
Parameters
TypeNameDescription
StringchannelName

The name of the channel whose transcription will be disabled.

Returns
TypeDescription
Task

Task for the operation

SpeechToTextEnableTranscription(String)

Enables the speech-to-text audio transcription inside a channel.

Declaration
Task SpeechToTextEnableTranscription(string channelName)
Parameters
TypeNameDescription
StringchannelName

The name of the channel whose transcription will be enabled.

Returns
TypeDescription
Task

Task for the operation

StartAudioInjection(String)

This function allows you to start audio injection. The audio file to use for audio injection should be of type WAV and MUST be single channel, 16-bit PCM, with the same sample rate as the negotiated audio codec. Injected audio is played only into the channels you're transmitting into.

Declaration
void StartAudioInjection(string audioFilePath)
Parameters
TypeNameDescription
StringaudioFilePath

The full pathname for the WAV file to use for audio injection (MUST be single channel, 16-bit PCM, with the same sample rate as the negotiated audio codec) required for start

StopAudioInjection()

This function allows you to stop audio injection

Declaration
void StopAudioInjection()

TextToSpeechCancelAllMessages()

Cancel all text-to-speech messages (ongoing and enqueued).

Declaration
void TextToSpeechCancelAllMessages()

TextToSpeechCancelMessages(TextToSpeechMessageType)

Cancels all text-to-speech messages of a particular TextToSpeechMessageType type (ongoing and enqueued).

Declaration
void TextToSpeechCancelMessages(TextToSpeechMessageType messageType)
Parameters
TypeNameDescription
TextToSpeechMessageTypemessageType

The type of messages that you'd like to cancel or have removed from the text-to-speech system's queue.

TextToSpeechSendMessage(String, TextToSpeechMessageType)

Sends a text-to-speech message to the channel currently being transmitted into based on the TextToSpeechMessageType passed in. This method can also be used for local playback of text/messages exclusively.

Declaration
void TextToSpeechSendMessage(string message, TextToSpeechMessageType messageType)
Parameters
TypeNameDescription
Stringmessage

The message that will be sent.

TextToSpeechMessageTypemessageType

Configuration for how the message should be sent.

TextToSpeechSetVoice(String)

Sets the current voice used when playback of a message occurs. TextToSpeechAvailableVoices contains a list of all available voice names that can be passed into this method when logged in.

Declaration
void TextToSpeechSetVoice(string voiceName)
Parameters
TypeNameDescription
StringvoiceName

The name of the voice profile you want to use

UnblockPlayerAsync(String)

"Unblock" a player, bidirectionally unmuting audio/text between that player and the local user.

Declaration
Task UnblockPlayerAsync(string playerId)
Parameters
TypeNameDescription
StringplayerId

The PlayerId to bidirectionally mute or unmute

Returns
TypeDescription
Task

Task for the operation

UnmuteInputDevice()

Unmutes the local user's input devices allowing the transmission of audio.

Declaration
void UnmuteInputDevice()

UnmuteOutputDevice()

Unmutes the local user's output devices allowing them to hear incoming audio.

Declaration
void UnmuteOutputDevice()

Events

AvailableInputDevicesChanged

An action triggered when the input device list in refreshed/updated. An example of when this will fire is when an input device is disconnected from the primary device.

Declaration
event Action AvailableInputDevicesChanged
Event Type
TypeDescription
Action

AvailableOutputDevicesChanged

An action triggered when the output device list in refreshed/updated. An example of when this will fire is when an output device is disconnected from the primary device.

Declaration
event Action AvailableOutputDevicesChanged
Event Type
TypeDescription
Action

ChannelJoined

An action that will trigger when a Channel has been successfully joined by the currently logged in user. Once this event fires, the user will be in the selected text/audio state based on the ChatCapabilities of the channel, and will be able to do all channel actions. Provides the ChannelName of the channel successfully joined.

Declaration
event Action<string> ChannelJoined
Event Type
TypeDescription
Action<String>

ChannelLeft

An action that will trigger when a Channel has been successfully left by the currently logged in user. Once this event fires, the user will no longer be in the text/audio state for this channel, and will no longer be able to do any channel operations. Provides the ChannelName of the channel successfully left.

Declaration
event Action<string> ChannelLeft
Event Type
TypeDescription
Action<String>

ChannelMessageDeleted

An Action that will trigger when a channel message has been deleted in any channel the user is in. The VivoxMessage itself will contain the ChannelName of the channel it was sent in, the PlayerId of the Sender, and the MessageId that was deleted. The MessageText will be null.

Declaration
event Action<VivoxMessage> ChannelMessageDeleted
Event Type
TypeDescription
Action<VivoxMessage>

ChannelMessageEdited

An Action that will trigger when a channel message has been edited in any channel the user is in. The VivoxMessage itself will contain the ChannelName of the channel it was sent in, the PlayerId of the Sender, and the MessageId that was edited.

Declaration
event Action<VivoxMessage> ChannelMessageEdited
Event Type
TypeDescription
Action<VivoxMessage>

ChannelMessageReceived

An Action that will trigger when a channel message has been received in any channel the user is in. The VivoxMessage itself will contain ChannelName of the channel it was sent in, and the PlayerId and DisplayName of the Sender

Declaration
event Action<VivoxMessage> ChannelMessageReceived
Event Type
TypeDescription
Action<VivoxMessage>

ConnectionFailedToRecover

An Action that will fire when the network connection has been interrupted for over 30 seconds, and Vivox has halted attempts to reconnect.

Declaration
event Action ConnectionFailedToRecover
Event Type
TypeDescription
Action

ConnectionRecovered

An action that will fire when the network connection has been successfully recovered.

Declaration
event Action ConnectionRecovered
Event Type
TypeDescription
Action

ConnectionRecovering

An Action that will fire when the network connection for the logged-in device is interrupted. Vivox will attempt to re-establish connection for 30 seconds, firing ConnectionRecovered if the connection is recovered, or ConnectionFailedToRecover if there is a failure to reconnect.

Declaration
event Action ConnectionRecovering
Event Type
TypeDescription
Action

DirectedMessageDeleted

An Action that will trigger when a direct message has been deleted in any channel the user is in. The VivoxMessage itself will have the PlayerId of the Player and the MessageId that was edited. The ChannelName and Message will be set to null.

Declaration
event Action<VivoxMessage> DirectedMessageDeleted
Event Type
TypeDescription
Action<VivoxMessage>

DirectedMessageEdited

An Action that will trigger when a direct message has been deleted in any channel the user is in. The VivoxMessage itself will have the PlayerId of the Player and the MessageId that was edited. The ChannelName will be set to null.

Declaration
event Action<VivoxMessage> DirectedMessageEdited
Event Type
TypeDescription
Action<VivoxMessage>

DirectedMessageReceived

An Action that will trigger when a directed message has been received by the currently logged in user. The VivoxMessage itself will have the PlayerId and DisplayName of the Player, and the ChannelName will be set to null.

Declaration
event Action<VivoxMessage> DirectedMessageReceived
Event Type
TypeDescription
Action<VivoxMessage>

EffectiveInputDeviceChanged

An action triggered when the effective input device changes. If the active input device is a virtual device such as default system device and the underlying device set in the system settings changes this event will be triggered.

Declaration
event Action EffectiveInputDeviceChanged
Event Type
TypeDescription
Action

EffectiveOutputDeviceChanged

An action triggered when the effective output device changes. If the active output device is a virtual device such as default system device and the underlying device set in the system settings changes this event will be triggered.

Declaration
event Action EffectiveOutputDeviceChanged
Event Type
TypeDescription
Action

LoggedIn

An action that will trigger when an Account is successfully LoggedIn to the Vivox Service.

Declaration
event Action LoggedIn
Event Type
TypeDescription
Action

LoggedOut

An action that will trigger when an Account is successfully LoggedIn to the Vivox Service.

Declaration
event Action LoggedOut
Event Type
TypeDescription
Action

ParticipantAddedToChannel

An Action that will trigger when a new Participant has been added to any channel the user is in. Provides a Participant object, which contains the Channel the participant is in, along with their PlayerId, DisplayName, whether speech has been detected, more specific audio energy changes and Muted status.

Declaration
event Action<VivoxParticipant> ParticipantAddedToChannel
Event Type
TypeDescription
Action<VivoxParticipant>

ParticipantRemovedFromChannel

An Action that will trigger when a Participant has been removed from a channel the user is in. Provides a Participant object, which contains the Channel the participant is in, along with their PlayerId, DisplayName, whether speech has been detected, more specific audio energy changes and Muted status.

Declaration
event Action<VivoxParticipant> ParticipantRemovedFromChannel
Event Type
TypeDescription
Action<VivoxParticipant>

SpeechToTextMessageReceived

An action that will trigger when a transcribed message is added. Provides the added transcribed message.

Declaration
event Action<VivoxMessage> SpeechToTextMessageReceived
Event Type
TypeDescription
Action<VivoxMessage>