OTSessionICEConfig

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.

Properties

Name Type Description
includeServers enum OTSessionICEIncludeServers Defines settings for whether to use only your custom TURN servers or to use those servers in addition to OpenTok TURN servers.
transportPolicy enum OTSessionICETransportPolicy Whether to use all ICE transport types (such as host, srflx, and TURN) to establish media connectivity or to only use TURN.
customIceServers NSArray * An NSArray of TURN servers added with OTSessionICEConfig addICEServerWithURL:. Each element in the array is an NSDictionary with turn_url, username, and credential as keys.
filterOutLanCandidates BOOL 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.

Methods

Name Description
(static) maxTURNServersLimit() → {NSInteger} The maximum number of custom TURN servers allowed.
addICEServerWithURL:userName:credential:error:(turn_url, username, credential, errorPtr) Adds a custom ICE server to be used by the session.

(static) maxTURNServersLimit() → {NSInteger}

The maximum number of custom TURN servers allowed.

Returns:

addICEServerWithURL:userName:credential:error:(turn_url, username, credential, errorPtr)

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

  • The URL is not valid
  • The user name or credential is empty
  • The maximum TURN servers limit was already reached (see maxUserTurnServersLimit).
Parameters:
Name Type Description
turn_url NSString * The URL for the custom TURN server.
username NSString * The username for the TURN server.
credential NSString * The credential string for the TURN server.
errorPtr NSError * * This is set to an NSError when there is an error calling the method, such as: