OTSessionICEConfig Class Reference

Inherits from NSObject
Declared in OTSession.h

Overview

Defines the <OTSessionSettings.iceConfig> property. This defines the TURN servers to be used by the client in the session.

For more information, see the configurable TURN servers developer guide.

  includeServers

Defines settings for whether to use only your custom TURN servers or to use those servers in addition to OpenTok TURN servers.

@property (nonatomic, assign) enum OTSessionICEIncludeServers includeServers

Declared In

OTSession.h

  transportPolicy

Whether to use all ICE transport types (such as host, srflx, and TURN) to establish media connectivity or to only use TURN.

@property (nonatomic, assign) enum OTSessionICETransportPolicy transportPolicy

Declared In

OTSession.h

  customIceServers

An NSArray of TURN servers added with . Each element in the array is an NSDictionary with turn_url, username, and credential as keys.

@property (readonly) NSArray *customIceServers

Declared In

OTSession.h

  filterOutLanCandidates

Whether to filter out host ICE candidate types from the same local area network, forcing the application to not use the local network to establish media connectivity. See this topic.

@property (nonatomic, assign) BOOL filterOutLanCandidates

Declared In

OTSession.h

+ maxTURNServersLimit

The maximum number of custom TURN servers allowed.

+ (NSInteger)maxTURNServersLimit

Declared In

OTSession.h

– addICEServerWithURL:userName:credential:error:

Adds a custom ICE server to be used by the session.

- (void)addICEServerWithURL:(NSString *_Nonnull)turn_url userName:(NSString *_Nonnull)username credential:(NSString *_Nonnull)credential error:(NSError *_Nonnull *_Nullable)errorPtr

Parameters

turn_url

The URL for the custom TURN server.

credential

The credential string for the TURN server.

errorPtr

This is set to an NSError when there is an error calling the method, such as:

  • The URL is not valid
  • The user name or credential is empty
  • The maximum TURN servers limit was already reached (see maxUserTurnServersLimit).
user

The username for the TURN server.

Declared In

OTSession.h