OTPublisherSettings Class Reference

Inherits from OTPublisherKitSettings : NSObject
Declared in OTPublisher.h

Overview

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 the OpenTok Media Router (sessions with the media mode set to routed), lowering the frame rate or lowering the resolution reduces the maximum bandwidth the stream can use. However, in sessions with the media mode set to relayed, lowering the frame rate or resolution may not reduce the stream’s bandwidth.

Defining publisher settings

  videoCapture

The OTVideoCapture instance used to capture video to stream to the OpenTok session. If this value is nil, the publisher uses the built-in video capturer (which uses the built-in camera as a video source).

@property (nonatomic, strong) id<OTVideoCapture> _Nullable videoCapture

Discussion

If an existing publisher is using the built-in camera as the video capturer, set this property to an OTVideoCapture object that uses another video source.

Declared In

OTPublisher.h

  cameraResolution

The resolution of the published video. Set this to a value defined in the OTCameraCaptureResolution enum. The default resolution is OTCameraCaptureResolutionMedium.

@property (nonatomic) OTCameraCaptureResolution cameraResolution

Declared In

OTPublisher.h

  cameraFrameRate

The frame rate of the published video. Set this to a value defined in the OTCameraCaptureFrameRate enum. If the device does not support the specified frame rate, it will set the frame rate to 30 frames per second.

@property (nonatomic) OTCameraCaptureFrameRate cameraFrameRate

Discussion

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 stream uses. However, in sessions that have the media mode set to relayed, lowering the frame rate does not reduce the stream’s bandwidth.

The default frame rate is OTCameraCaptureFrameRate20FPS.

Declared In

OTPublisher.h