TVIConnectOptions Class Reference

Inherits from NSObject
Declared in TVIConnectOptions.h

Overview

This configuration overrides what was provided in TVIClientOptions.

  accessToken

A JWT access token which will be used to join the Room.

@property (nonatomic, copy, readonly, nonnull) NSString *accessToken

Declared In

TVIConnectOptions.h

  audioTracks

A collection of local audio tracks which will be shared in the Room.

@property (nonatomic, copy, readonly, nonnull) NSArray<TVILocalAudioTrack*> *audioTracks

Declared In

TVIConnectOptions.h

  automaticSubscriptionEnabled

Enables or disables automatic Track subcription in Group Rooms.

@property (nonatomic, assign, readonly, getter=isAutomaticSubscriptionEnabled) BOOL automaticSubscriptionEnabled

Discussion

By default, your LocalParticipant will subscribe to every RemoteParticipant’s Tracks. You can disable this by setting automaticSubscriptionEnabled to NO. Note that this does not take effect in Peer-to-Peer (P2P) Rooms, where the setting is silently ignored.

Declared In

TVIConnectOptions.h

  dataTracks

A collection of local data tracks which will be shared in the Room.

@property (nonatomic, copy, readonly, nonnull) NSArray<TVILocalDataTrack*> *dataTracks

Declared In

TVIConnectOptions.h

  delegateQueue

The queue where the Room and associated classes will invoke delegate methods.

@property (nonatomic, strong, readonly, nullable) dispatch_queue_t delegateQueue

Discussion

All delegate methods except for TVIVideoViewDelegate and TVICameraCaptureDelegate are performed on this queue. Any TVIRoom instance which is created with these options will maintain a strong reference to the queue until it is destroyed. The default value of nil indicates that the main dispatch queue will be used.

Declared In

TVIConnectOptions.h

  dominantSpeakerEnabled

Enables or disables the Dominant Speaker API.

@property (nonatomic, assign, readonly, getter=isDominantSpeakerEnabled) BOOL dominantSpeakerEnabled

Discussion

Set this to YES to enable the Dominant Speaker API when using Group Rooms. This option has no effect in Peer-to-Peer Rooms. The default value is NO.

Declared In

TVIConnectOptions.h

  encodingParameters

Encoding parameters to use when sharing media in the Room.

@property (nonatomic, strong, readonly, nullable) TVIEncodingParameters *encodingParameters

Discussion

See TVIEncodingParameters for more information. Setting this value to nil indicates that default parameters will be chosen by the media engine.

Declared In

TVIConnectOptions.h

  iceOptions

A custom ICE configuration used to connect to a Room.

@property (nonatomic, strong, readonly, nullable) TVIIceOptions *iceOptions

Declared In

TVIConnectOptions.h

  insightsEnabled

Enables or disables Insights statistics collection.

@property (nonatomic, assign, readonly, getter=areInsightsEnabled) BOOL insightsEnabled

Discussion

The default value is YES. Insights reports metrics about the Media that your Participant sends and receives in a Room.

Declared In

TVIConnectOptions.h

  networkQualityEnabled

Enables or disables the Network Quality API.

@property (nonatomic, assign, readonly, getter=isNetworkQualityEnabled) BOOL networkQualityEnabled

Discussion

Set this to YES to enable the Network Quality API when using Group Rooms. This option has no effect in Peer-to-Peer Rooms. The default value is NO.

Declared In

TVIConnectOptions.h

  networkPrivacyPolicy

This policy restricts which communication routes can be used to send and receive media with other Participants.

@property (nonatomic, assign, readonly) TVILocalNetworkPrivacyPolicy networkPrivacyPolicy

Discussion

The default value is allowAll on iOS 11-13 and blockLocal on iOS 14 and above.

Declared In

TVIConnectOptions.h

  preferredAudioCodecs

The collection of preferred audio codecs.

@property (nonatomic, copy, readonly, nonnull) NSArray<TVIAudioCodec*> *preferredAudioCodecs

Discussion

The list specifies which audio codecs will be preferred when negotiating audio between participants. The preferences are applied in the order found in the list starting with the most preferred audio codec to the least preferred audio codec. Audio codec preferences are not guaranteed to be satisfied because not all participants are guaranteed to support all audio codecs. TVIOpusCodec is the default audio codec if no preferences are set.

Declared In

TVIConnectOptions.h

  preferredVideoCodecs

The collection of preferred video codecs.

@property (nonatomic, copy, readonly, nonnull) NSArray<TVIVideoCodec*> *preferredVideoCodecs

Discussion

The list specifies which video codecs will be preferred when negotiating video between participants. The preferences are applied in the order found in the list starting with the most preferred video codec to the least preferred video codec. Video codec preferences are not guaranteed to be satisfied because not all participants are guaranteed to support all video codecs. TVIVp8Codec is the default video codec if no preferences are set.

Declared In

TVIConnectOptions.h

  roomName

The name of the Room which you want to connect to.

@property (nonatomic, copy, readonly, nullable) NSString *roomName

Discussion

You can provide the name of new or existing Room. The default value of nil indicates that a new Room will be created.

Declared In

TVIConnectOptions.h

  videoTracks

A collection of local video tracks which will be shared in the Room.

@property (nonatomic, copy, readonly, nonnull) NSArray<TVILocalVideoTrack*> *videoTracks

Declared In

TVIConnectOptions.h

– init

Developers shouldn’t initialize this class directly.

- (null_unspecified instancetype)init

Discussion

Use the class methods optionsWithToken: or optionsWithToken:block: instead.

Declared In

TVIConnectOptions.h

+ optionsWithToken:

Creates TVIConnectOptions using an access token.

+ (nonnull instancetype)optionsWithToken:(nonnull NSString *)token

Parameters

token

A JWT access token which will be used to join the Room.

Return Value

An instance of TVIConnectOptions.

Declared In

TVIConnectOptions.h

+ optionsWithToken:block:

Creates an instance of TVIConnectOptions using an access token and a builder block.

+ (nonnull instancetype)optionsWithToken:(nonnull NSString *)token block:(nonnull TVIConnectOptionsBuilderBlock)block

Parameters

token

A JWT access token which will be used to join the Room.

block

The builder block which will be used to configure the TVIConnectOptions instance.

Return Value

An instance of TVIConnectOptions.

Declared In

TVIConnectOptions.h