OTPublisherKitSettings Class Reference

Inherits from NSObject
Declared in OTPublisherKit.h

Overview

Defines settings to be used when initializing a publisher using the [OTPublisherKit initWithDelegate:settings:] method.

Defining publisher settings

  name

The name of the publisher video. The [OTStream name] property for a stream published by this publisher will be set to this value (on all clients). The default value is nil.

@property (nonatomic, copy, nullable) NSString *name

Declared In

OTPublisherKit.h

  audioTrack

Whether to publish audio (YES, the default) or not (NO).

@property (nonatomic) BOOL audioTrack

Discussion

If this property is set to NO, the audio subsystem will not be initialized for the publisher, and setting the [OTPublisherKit publishAudio] property will have no effect. If your application does not require the use of audio, it is recommended to set this Builder property rather than use the [OTPublisherKit publishAudio] property, which only temporarily disables the audio track.

Declared In

OTPublisherKit.h

  videoTrack

Whether to publish video (YES, the default) or not (NO).

@property (nonatomic) BOOL videoTrack

Discussion

If this property is set to NO, the video subsystem will not be initialized for the publisher, and setting the [OTPublisherKit publishVideo] property will have no effect. If your application does not require the use of video, it is recommended to set this Builder property rather than use the [OTPublisherKit publishVideo] property, which only temporarily disables the video track.

Declared In

OTPublisherKit.h

  audioBitrate

The desired bitrate for the published audio, in bits per second. The supported range of values is 6,000 - 510,000. (Invalid values are ignored.) Set this value to enable high-quality audio (or to reduce bandwidth usage with lower-quality audio).

@property (nonatomic) int audioBitrate

Discussion

The following are recommended settings:

  • 8,000 - 12,000 for narrowband (NB) speech
  • 16,000 - 20,000 for wideband (WB) speech
  • 28,000 - 40,000 for full-band (FB) speech
  • 48,000 - 64,000 for full-band (FB) mono music
  • 64,000 - 128,000 for full-band (FB) stereo music

The default value is 40,000.

To set other audio settings, see the OTAudioDeviceManager interface.

Declared In

OTPublisherKit.h

  enableOpusDtx

Whether to enable Opus DTX (YES) or not (NO, the default). Enabling Opus DTX can reduce bandwidth usage in streams that have long periods of silence.

@property (nonatomic) BOOL enableOpusDtx

Declared In

OTPublisherKit.h

  scalableScreenshare

Whether to allow use of scalable video for a publisher that has the videoType set to OTStreamVideoTypeScreen (YES) or not (NO, the default).

@property (nonatomic) BOOL scalableScreenshare

Declared In

OTPublisherKit.h

  subscriberAudioFallbackEnabled

Whether the stream will use the subscriber audio-fallback feature (YES) or not (NO), for subscribers to the published stream. The subscriber audio-fallback feature is available in sessions that use the the OpenTok Media Router. With the subscriber audio-fallback feature enabled, when the OpenTok Media Router determines that a stream’s quality has degraded significantly for a specific subscriber, it disables the video in that subscriber in order to preserve call quality.

@property (nonatomic, assign) BOOL subscriberAudioFallbackEnabled

Discussion

The default setting is YES (the audio-fallback feature is enabled) for publishers using the camera. When using the screen video type in a session that uses the OpenTok Media Server, the subscriber audio-fallback property is set to NO by default, so that the video does not drop out in subscribers.

For more information, see [OTPublisherKit videoType], [OTSubscriberKitDelegate subscriberVideoDisabled:reason:], OTSubscriberVideoEventReason, the OpenTok Media Router.

Declared In

OTPublisherKit.h

  publisherAudioFallbackEnabled

Whether the stream will use the publisher audio-fallback feature (YES) or not (NO). With the publisher audio-fallback feature enabled, when the Publisher determines that a stream’s quality has degraded significantly, it disables the video in in order to preserve call quality.

@property (nonatomic, assign) BOOL publisherAudioFallbackEnabled

Discussion

The default setting is NO (the audio-fallback feature is disabled).

For more information, see [OTPublisherKit videoType], [OTPublisherKitDelegate publisherVideoDisabled:reason:], OTPublisherVideoEventReason, the OpenTok Media Router.

Declared In

OTPublisherKit.h