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 videoCaptureDiscussion
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 cameraResolutionDeclared In
OTPublisher.h
cameraFrameRate
The frame rate of the published video. Set this to a value defined in the OTCameraCaptureFrameRate enum.
@property (nonatomic) OTCameraCaptureFrameRate cameraFrameRateDiscussion
If the camera does not support the specified frame rate, the closest
supported frame rate above the requested one is used. For example, on a
camera whose lowest supported frame rate is 15 fps, requesting
OTCameraCaptureFrameRate7FPS results in 15 fps. If the requested frame
rate is higher than anything the camera supports, the highest supported
frame rate is used.
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 OTCameraCaptureFrameRate30FPS.
Declared In
OTPublisher.h