OTPublisherKit Class Reference
Inherits from | NSObject |
Declared in | OTPublisherKit.h |
Overview
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” in the README file for the OpenTok iOS SDK.
Tasks
Initializing a publisher
Getting information about the publisher
-
delegate
property -
audioLevelDelegate
property -
session
property -
stream
property -
name
property
Controlling audio and video output for a publisher
-
publishAudio
property -
publishVideo
property
Setting publisher device configuration
-
videoCapture
property -
videoRender
property
Properties
audioLevelDelegate
Periodically receives reports of audio levels for this publisher.
@property (nonatomic, assign) id<OTPublisherKitAudioLevelDelegate> audioLevelDelegate
Discussion
This is a separate delegate object from that set as the delegate property (the OTPublisherKitDelegate object).
If you do not set this property, the audio sampling subsystem is disabled.
Declared In
OTPublisherKit.h
delegate
The OTPublisherDelegate object, which is the delegate for the OTPublisher object.
@property (nonatomic, assign) id<OTPublisherKitDelegate> delegate
Declared In
OTPublisherKit.h
name
A string that will be associated with this publisher’s stream. This string is displayed at the bottom of subscriber videos associated with the published stream, if an overlay to display the name exists.
@property (readonly) NSString *name
Discussion
Name must be set at initialization, when you when you send the [OTPublisherKit initWithDelegate:name:] message.
This value defaults to an empty string.
Declared In
OTPublisherKit.h
publishAudio
Whether to publish audio.
@property (nonatomic) BOOL publishAudio
Discussion
The default value is TRUE.
Declared In
OTPublisherKit.h
publishVideo
Whether to publish video.
@property (nonatomic) BOOL publishVideo
Discussion
The default value is TRUE.
Declared In
OTPublisherKit.h
session
The session that owns this publisher.
@property (readonly) OTSession *session
Declared In
OTPublisherKit.h
stream
The OTStream object associated with the publisher.
@property (readonly) OTStream *stream
Declared In
OTPublisherKit.h
videoCapture
The OTVideoCapture instance used to capture video to stream to the OpenTok session.
@property (nonatomic, retain) id<OTVideoCapture> videoCapture
Declared In
OTPublisherKit.h
videoRender
The OTVideoRender instance used to render video to stream to the OpenTok session.
@property (nonatomic, retain) id<OTVideoRender> videoRender
Declared In
OTPublisherKit.h
Instance Methods
initWithDelegate:
Initialize a publisher object and specify the delegate object.
- (id)initWithDelegate:(id)delegate
Parameters
- delegate
The delegate (OTPublisherKitDelegate) object for the publisher.
Return Value
The pointer to the instance, or nil
if initialization failed.
Discussion
When running in the XCode iOS Simulator, this method returns nil
.
Declared In
OTPublisherKit.h
initWithDelegate:name:
Initialize a publisher object, and specify the delegate object and the stream’s name.
- (id)initWithDelegate:(id)delegate name:(id)name
Parameters
- delegate
The delegate (OTPublisherKitDelegate) object for the publisher.
- name
The name for this stream. This string is displayed at the bottom of publisher videos and at the bottom of subscriber videos associated with the published stream.
Return Value
The pointer to the instance, or nil
if initialization failed.
Discussion
When running in the XCode iOS Simulator, this method returns nil
.
Declared In
OTPublisherKit.h