Class Client
Provide access to the Vivox system. Note: An application should have only one Client object.
Implements
Inherited Members
Namespace: VivoxUnity
Assembly: VivoxUnity.dll
Syntax
public sealed class Client : IDisposable
Constructors
Client(Uri)
Declaration
public Client(Uri serverUri = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | serverUri |
Properties
AudioInputDevices
The audio input devices associated with this Client instance.
Declaration
public IAudioDevices AudioInputDevices { get; }
Property Value
Type | Description |
---|---|
IAudio |
AudioOutputDevices
The audio output devices associated with this Client instance.
Declaration
public IAudioDevices AudioOutputDevices { get; }
Property Value
Type | Description |
---|---|
IAudio |
Initialized
Specifies whether the client is initialized: True if initialized, false if uninitialized. Note: The state of this is managed by the Core SDK; the wrapper is forwarding the information.
Declaration
public bool Initialized { get; }
Property Value
Type | Description |
---|---|
bool |
InternalVersion
The internal version of the low-level vivoxsdk library.
Declaration
public static string InternalVersion { get; }
Property Value
Type | Description |
---|---|
string |
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
public bool IsAudioEchoCancellationEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
LoginSessions
All of the Login sessions associated with this Client instance.
Declaration
public IReadOnlyDictionary<AccountId, ILoginSession> LoginSessions { get; }
Property Value
Type | Description |
---|---|
IRead |
defaultRealm
The domain that the server determines during client connector creation. Otherwise, this is NULL.
Declaration
public static string defaultRealm { get; }
Property Value
Type | Description |
---|---|
string |
tokenGen
Declaration
public static VxTokenGen tokenGen { get; set; }
Property Value
Type | Description |
---|---|
Vx |
Methods
Cleanup()
Declaration
public static void Cleanup()
GetLoginSession(AccountId)
Gets the LoginSession object for the provided accountId, and creates one if necessary.
Declaration
public ILoginSession GetLoginSession(AccountId accountId)
Parameters
Type | Name | Description |
---|---|---|
Account |
accountId | The AccountId. |
Returns
Type | Description |
---|---|
ILogin |
The login session for the accountId. |
Remarks
If a new LoginSession is created, then LoginSessions.AfterKeyAdded is raised.
Exceptions
Type | Condition |
---|---|
Argument |
Thrown when accountId is null or empty. |
Initialize(VivoxConfig)
Initialize this Client instance. Note: If this Client instance is already initialized, then this does nothing.
Optional: config to set on initialize.Declaration
public void Initialize(VivoxConfig config = null)
Parameters
Type | Name | Description |
---|---|---|
Vivox |
config |
Run(LoopDone)
Declaration
public static void Run(LoopDone done)
Parameters
Type | Name | Description |
---|---|---|
Loop |
done |
Run(WaitHandle, TimeSpan)
Declaration
public static bool Run(WaitHandle handle, TimeSpan until)
Parameters
Type | Name | Description |
---|---|---|
Wait |
handle | |
Time |
until |
Returns
Type | Description |
---|---|
bool |
RunOnce()
Process all asynchronous messages. This must be called periodically by the application at a frequency of no less than every 100ms.
Declaration
public static void RunOnce()
SetAudioEchoCancellation(bool)
Turn Vivox's audio echo cancellation feature on or off.
Declaration
public void SetAudioEchoCancellation(bool onOff)
Parameters
Type | Name | Description |
---|---|---|
bool | onOff | True for on, False for off. |
Uninitialize()
Uninitialize this Client instance. Note: If this Client instance is not initialized, then this does nothing.
Declaration
public void Uninitialize()