TVIVideoClient Class Reference

Inherits from NSObject
Declared in TVIVideoClient.h

Overview

TVIVideoClient is the root class of the TwilioVideo SDK. You can connect to a Room using an instance of this class.

– init

Developers shouldn’t initialize this class directly.

- (null_unspecified instancetype)init

Discussion

Use TVIVideoClient class factory methods to create a TVIRoom.

Declared In

TVIVideoClient.h

+ clientWithToken:

Creates a TVIVideoClient using an access token.

+ (null_unspecified instancetype)clientWithToken:(nonnull NSString *)token

Parameters

token

The access token.

Return Value

An instance of TVIVideoClient if successful and nil otherwise.

Discussion

The default TVIClientOptions will be used to create TVIVideoClient. Delegate callbacks will be performed on the main queue.

Declared In

TVIVideoClient.h

+ clientWithToken:options:

Creates a TVIVideoClient using an access token and TVIClientOptions.

@disccussion Delegate callbacks will be performed on the main queue if delegateQueue is nil in clientOptions.

+ (null_unspecified instancetype)clientWithToken:(nonnull NSString *)token options:(nullable TVIClientOptions *)clientOptions

Parameters

token

The access token.

clientOptions

The client options.

Return Value

An instance of TVIVideoClient if successful and nil otherwise.

Declared In

TVIVideoClient.h

– updateToken:

Updates the access token.

- (void)updateToken:(nonnull NSString *)token

Parameters

token

The access token.

Declared In

TVIVideoClient.h

– connectWithDelegate:

Connect to an unnamed Room.

- (nonnull TVIRoom *)connectWithDelegate:(nullable id<TVIRoomDelegate>)delegate

Parameters

delegate

A delegate conforming to TVIRoomDelegate for handling Room related events.

Return Value

An instance of TVIRoom if successful and nil otherwise.

Discussion

This method connects to a random unnamed Room. Once connected the TVIRoom may be queried for its sid.

Declared In

TVIVideoClient.h

– connectWithOptions:delegate:

Connect to a Room with connect options.

- (nonnull TVIRoom *)connectWithOptions:(nullable TVIConnectOptions *)options delegate:(nullable id<TVIRoomDelegate>)delegate

Parameters

options

The connect options.

delegate

A delegate conforming to TVIRoomDelegate for handling Room related events.

Return Value

An instance of TVIRoom if successful and nil otherwise.

Declared In

TVIVideoClient.h

+ version

Returns the SDK version.

+ (nonnull NSString *)version

Return Value

Video sdk version of type string.

Declared In

TVIVideoClient.h

+ logLevel

Retrieve the log level for the Video SDK. The default log level is TVILogLevelError.

+ (TVILogLevel)logLevel

Return Value

The current log level.

Declared In

TVIVideoClient.h

+ setLogLevel:

Set the log level for the TwilioVideo SDK.

+ (void)setLogLevel:(TVILogLevel)logLevel

Parameters

logLevel

The TVILogLevel in use by the system.

Declared In

TVIVideoClient.h

+ setLogLevel:module:

Set the log level for a specific module in the TwilioVideo SDK.

+ (void)setLogLevel:(TVILogLevel)logLevel module:(TVILogModule)module

Parameters

logLevel

The TVILogLevel to be used by the module.

module

The TVILogModule for which the log level needs to be set.

Declared In

TVIVideoClient.h