OpenTok iOS SDK reference
The OpenTok iOS SDK includes the following classes:
| Class | Description |
|---|---|
| OTAudioBus | The audio bus marshals audio data between the network and the audio device. Call the [OTAudioDevice setAudioBus:] method to define the object that implements the OTAudioBus protocol. The audio device pushes captured audio samples to and fetches unrendered audio samples from the audio bus. The object |
| OTAudioData | Defines audio data passed into the [OTCustomAudioTransformer transform:] method. method. |
| OTAudioDevice | Defines an audio device for use in a session. See [OTAudioDeviceManager setAudioDevice:]. |
| OTAudioDeviceManager | Use the AudioDeviceManager to set a custom audio device to be used by the app. The audio device manages access to the audio capturing and rendering hardware. You can only define a single audio capture source and rendering target for the entire process. You cannot set these individually for each publ |
| OTAudioFormat | Defines the format of the audio when a custom audio driver is used. Note that on iOS devices, specify a sample rate of 32, 16, or 8 kHz (32000, 16000, or 8000); do not use a sample rate of 44.1 kHz on iOS devices. On the simulator, however, the sampling rate must be 44.1 kHz (44100) in order to prop |
| OTAudioSessionManager | Defines an audio session manager for use with calling services like CallKit. Implementation of this protocol is optional. Custom audio devices can implement these methods to manage the AVAudioSession. The default audio device in the SDK provides a working implementation. For more information, see th |
| OTAudioTransformer | Defines a transformer of an audio stream. |
| OTCameraCaptureFrameRate | Defines values for the cameraFrameRate parameter of the [OTPublisher initWithDelegate:name:cameraResolution:cameraFrameRate:] method. Note that in sessions that use the OpenTok Media Router (sessions with the media mode set to routed), lowering the frame rate proportionally reduces the bandwidth the |
| OTCameraCaptureResolution | Defines values for the cameraResolution parameter of the [OTPublisher initWithDelegate:name:cameraResolution:cameraFrameRate:] method. |
| OTConnection | Represents a connection to an OpenTok session. The OTSession class includes a connection property, which is an OTConnection object. Also, The OTStream class includes a connection property, which is an OTConnection object. |
| OTCustomAudioTransformer | Defines a custom transformer for an audio stream, to be passed into the [OTAudioTransformer initWithName:transformer:] method. |
| OTCustomVideoTransformer | Defines a custom transformer for a video stream, to be passed into the [OTVideoTransformer initWithName:transformer:] method. |
| OTDegradationPreference | For details, see Degradation Preference. |
| OTError | Defines errors for the OpenTok iOS SDK. See the documentation for the following constant enumerations, which define the code values for OTError objects: OTPublisherErrorCode OTSessionErrorCode OTSubscriberErrorCode |
| OTMuteForcedInfo | Defines the muteForced parameter of the [OTSessionDelegate session:muteForced:] message. |
| OTNetworkCondition | Estimated network condition score for a transport. This enum represents the overall health of the network connection for a given transport (local or remote). It is typically derived from metrics such as packet loss and estimated available bandwidth. Higher values indicate better network conditions. |
| OTNetworkDegradationSource | Indicates the source of video or network degradation in the session. This enum identifies which side of the call is responsible for observed network issues impacting video quality. It complements per-transport network condition metrics. |
| OTNetworkReason | Describes the primary reason impacting network condition. These values indicate the primary factor affecting the current network condition assessment, such as bandwidth constraints, or packet loss. |
| OTPixelFormat | Defines values for pixel format for the pixelFormat property of an OTVideoFrame object. |
| OTPublisher | A publisher captures an audio-video stream from the device's microphone and camera. You can then publish the audio-video stream to an OpenTok session by sending the [OTSession publish:error:] message. The OpenTok iOS SDK supports publishing on all multi-core iOS devices. See "Developer and client re |
| OTPublisherDelegate | Used for sending messages for an OTPublisher instance. |
| OTPublisherErrorCode | Enumerations of error code values used by [OTPublisherKitDelegate publisher:didFailWithError:]. |
| OTPublisherKit | A publisher captures an audio-video stream from the sources you specify. You can then publish the audio-video stream to an OpenTok session by sending the [OTSession publish:error:] message. The OpenTok iOS SDK supports publishing on all multi-core iOS devices. See "Developer and client requirements" |
| OTPublisherKitAudioLevelDelegate | Used for monitoring the audio levels of the publisher. |
| OTPublisherKitAudioNetworkStats | Describes audio statistics for a publisher. See [OTPublisherKit setNetworkStatsDelegate:]. |
| OTPublisherKitDelegate | Used for sending messages for an OTPublisher instance. The OTPublisher class includes a delegate property. When you send the [OTPublisherKit initWithDelegate:] message or the [OTPublisherKit initWithDelegate:settings:] message, you specify an OTPublisherKitDelegate object. |
| OTPublisherKitMediaLinkStats | Provides publisher media link statistics including local transport metrics. Since video and audio share the same underlying transport, this class consolidates the local transport statistics into a single object. |
| OTPublisherKitNetworkStatsDelegate | Used to monitor audio and video statistics for the publisher. See [OTPublisherKit networkStatsDelegate]. |
| OTPublisherKitRtcStatsReportDelegate | Used for sending messages reporting publisher RTC statistics. Set the [OTPublisherKit rtcStatsReportDelegate] property to use this delegate. After you call the [OTPublisherKit getRtcStatsReport] method, the [OTPublisherKitRtcStatsReportDelegate publisher:rtcStatsReport:] message is sent to report th |
| OTPublisherKitSettings | Defines settings to be used when initializing a publisher using the [OTPublisherKit initWithDelegate:settings:] method. |
| OTPublisherKitVideoLayerStats | Describes statistics for a single published video layer. In a simulcast configuration, each entry corresponds to one independent video encoding (for example, low-, medium-, and high-resolution streams sent in parallel). For SVC (Scalable Video Coding), the publisher typically sends a single video en |
| OTPublisherKitVideoNetworkStats | Describes video statistics for a publisher. See [OTPublisherKit setNetworkStatsDelegate:]. |
| OTPublisherKitVideoType | Defines values for the [OTPublisherKit videoType] property. |
| OTPublisherRtcStats | Represents RTC statistics for a media stream published by the publisher. See [OTPublisherKit getRtcStatsReport]. |
| OTPublisherSettings | Defines settings to be used when initializing a publisher using the [OTPublisher initWithDelegate:settings:] method. This includes settings for the resolution and the frame rate of the publisher's video, in addition to settings inherited from the OTPublisherKitSettings class. For sessions that use t |
| OTPublisherVideoEventReason | Video enabled and disabled events are accompanied with a reason code, for determining why the video track was enabled/disabled. |
| OTQualityRestriction | Describes reasons for sender quality restriction. These values indicate media server quality adjustments (spatial/temporal switches) detected during a session. |
| OTSenderStats | Represents video statistics reported by the sender side, such as bitrate estimates. |
| OTSession | The first step in using the OpenTok iOS SDK is to initialize an OTSession object with your API key and a valid session ID Use the OTSession object to connect to OpenTok using your developer API key and a valid token. |
| OTSessionCapabilities | Defines the [OTSession capabilities] property. After you have connected to a session and the [OTSessionDelegate sessionDidConnect:] method has been called, this property identifies whether the client can publish and subscribe to streams in the session, based on the role assigned to the token used to |
| OTSessionConnectionStatus | The connection status codes, available through [OTSession sessionConnectionStatus]. |
| OTSessionDelegate | Used to send messages for an OTSession instance. The OTSession class includes a delegate property. When you send the [OTSession initWithApiKey:sessionId:delegate:] message, you specify an OTSessionDelegate object. |
| OTSessionErrorCode | Enumerations of error code values used by [OTSessionDelegate session:didFailWithError:]. |
| 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. |
| OTSessionICEIncludeServers | Defines settings for whether to use only your custom TURN servers or to use those servers in addition to OpenTok TURN servers. Defines values for the OTSessionSettings.iceConfig property. |
| OTSessionICETransportPolicy | Defines settings for whether to use all ICE transport types (such as host, srflx, and TURN) to establish media connectivity or to only use TURN. Used in the [OTSessionICEConfig transportPolicy] setting. |
| OTSessionSettings | Defines settings to be used when initializing an OTSession object using the [OTSession initWithApiKey:sessionId:delegate:settings:] method. |
| OTStream | An OTStream object represents a stream of multimedia, which may contain video and/or audio data. Use OTStream instances to initialize OTSubscriber interfaces. Do not attempt to initialize an OTStream directly. |
| OTStreamVideoType | Defines values for the [OTStream videoType] property. |
| OTSubscriber | Renders OpenTok streams, and provides a UIView that renders video and provides some simple end-user controls. |
| OTSubscriberDelegate | OTSubscriberDelegate extends OTSubscriberKitDelegate with additional optional callbacks specific to the OTSubscriber implementation. Currently, there is only one additional callback, but others may be added in a future release. |
| OTSubscriberErrorCode | Enumerations of error code values used by [OTSubscriberKitDelegate subscriber:didFailWithError:]. |
| OTSubscriberKit | An OTSubscriberKit (subscriber) object renders media data bound to an OTStream. The OTSubscriberKit class lets you set a custom video renderer for the video stream. Use this class if you are interested in providing your own video processing and rendering implementation. Otherwise, use the OTSubscrib |
| OTSubscriberKitAudioLevelDelegate | Used for monitoring the audio levels of the subscriber. |
| OTSubscriberKitAudioNetworkStats | Describes audio statistics for a subscriber. See [OTSubscriberKit setNetworkStatsDelegate:]. |
| OTSubscriberKitCaptionsDelegate | Used for receiving captions for a subscriber's stream. |
| OTSubscriberKitDelegate | Used to send messages for an OTSubscriber instance. When you send the [OTSubscriberKit initWithStream:delegate:] message, you specify an OTSubscriberKitDelegate object. |
| OTSubscriberKitMediaLinkStats | Provides subscriber media link statistics including local and remote transport metrics and network degradation information. Since audio and video share the same underlying transport, this class consolidates the local transport, remote publisher transport, and network degradation source into a single |
| OTSubscriberKitNetworkStatsDelegate | Used to monitor audio and video statistics for the subscriber. See [OTSubscriberKit networkStatsDelegate]. |
| OTSubscriberKitRtcStatsReportDelegate | Used for sending messages reporting subscriber RTC statistics. Set the [OTSubscriberKit rtcStatsReportDelegate] property to use this delegate. After you call the [OTSubscriberKit getRtcStatsReport] method, the [OTSubscriberKitRtcStatsReportDelegate subscriber:rtcStatsReport:] message is sent to repo |
| OTSubscriberKitVideoNetworkStats | Describes video statistics for a subscriber. See [OTSubscriberKit setNetworkStatsDelegate:]. |
| OTSubscriberVideoEventReason | Video enabled and disabled events are accompanied with a reason code, for determining why the video track was enabled/disabled. |
| OTTransportStats | Provides network-level transport statistics. The OTTransportStats class exposes metrics related to the underlying network transport layer of a WebRTC connection. These stats reflect current conditions such as the estimated available bandwidth and can be used for monitoring or debugging network perfo |
| OTVideoBitratePreset | Preset strategies for controlling video bitrate in a publisher's stream. These presets allow applying predefined bandwidth strategies without manually specifying bitrates. Presets are mutually exclusive with manual bitrate configuration. See [OTPublisherKit videoBitratePreset] and Publisher Max Bitr |
| OTVideoCapture | Defines a video capturer to be used by an OTPublisherKit object. See the videoCapture property of an OTPublisherKit object. |
| OTVideoCaptureConsumer | Defines a the consumer of an OTVideoCapture object. |
| OTVideoCodecPreference | This class allows you to specify whether the SDK should automatically select the best video codec or if you want to explicitly provide a list of preferred codecs. It is used when configuring publishers to control which codecs are prioritized during negotiation. If it's not used, the codec specified |
| OTVideoCodecType | Define values for the [OTVideoCodecPreference codecs] property as well as items in the array used by the [OTVideoCodecPreference manualWithCodecs:] method. |
| OTVideoContentHint | Defines values for the OTVideoCapture setVideoContentHint: method. You can read more about these options in the W3C Working Draft. And here are some live examples. |
| OTVideoFormat | Defines the video format assigned to an instance of an OTVideoFrame object. |
| OTVideoFrame | Defines a frame of a video. See [OTVideoRender renderVideoFrame:] and [OTVideoCaptureConsumer consumeFrame:]. |
| OTVideoOrientation | Defines values for video orientations (up, down, left, right) for the orieintation property of an OTVideoFrame object. |
| OTVideoRender | Defines a video renderer to be used by an OTPublisherKit object or an OTSubscriberKit object. See the videoRender properties of OTPublisherKit object and OTSubscriberKit. |
| OTVideoTransformer | Defines a transformer of a video stream. |
| OTVideoViewScaleBehavior | Defines values for the [OTSubscriber viewScaleBehavior] and [OTPublisher viewScaleBehavior] properties. |