MillicastSDK 2.0.0
|
The Publisher interface is responsible for publishing media to a Millicast stream. More...
#import <publisher.h>
Instance Methods | |
(instancetype) | - initWithDelegate: |
(void) | - publishWithCompletionHandler: |
(void) | - publishWithOptions:completionHandler: |
(void) | - unpublishWithCompletionHandler: |
(void) | - isPublishingWithCompletionHandler: |
(void) | - setCredentials:completionHandler: |
(void) | - getCredentialsWithCompletionHandler: |
(void) | - addTrackWithVideoTrack:completionHandler: |
(void) | - addTrackWithAudioTrack:completionHandler: |
(void) | - clearTracksWithCompletionHandler: |
(void) | - recordWithCompletionHandler: |
(void) | - unrecordWithCompletionHandler: |
Instance Methods inherited from <MCClient> | |
(void) | - connectWithCompletionHandler: |
(void) | - connectWithOptions:completionHandler: |
(void) | - connectWithWebsocketUrl:jwt:completionHandler: |
(void) | - connectWithWebsocketUrl:jwt:connectionOptions:completionHandler: |
(void) | - isConnectedWithCompletionHandler: |
(void) | - disconnectWithCompletionHandler: |
(void) | - enableStats:completionHandler: |
Properties | |
id< MCPublisherDelegate > | delegate |
The Publisher interface is responsible for publishing media to a Millicast stream.
- (void) addTrackWithAudioTrack: | (nonnull MCAudioTrack *) | audioTrack | |
completionHandler: | (nonnull void(^)(void)) | completionHandler | |
Adds an audio track to the publisher. See MCAudioSource/startCapture
as an example for capturing an audio device track.
- (void) addTrackWithVideoTrack: | (nonnull MCVideoTrack *) | videoTrack | |
completionHandler: | (nonnull void(^)(void)) | completionHandler | |
Adds a video track to the publisher. See MCVideoSource/startCapture
as an example for capturing a video device track.
- (void) clearTracksWithCompletionHandler: | (nonnull void(^)(void)) | completionHandler |
Clears all tracks added to the publisher.
- (void) getCredentialsWithCompletionHandler: | (nonnull void(^)(MCPublisherCredentials *_Nonnull)) | completionHandler |
Returns the current publisher credentials.
- (instancetype) initWithDelegate: | (nullable id< MCPublisherDelegate >) | delegate |
Initializes a publisher.
- (void) isPublishingWithCompletionHandler: | (nonnull void(^)(BOOL publishing)) | completionHandler |
Checks whether the publisher is currently in a publishing state and returns a boolean indicating the publishing status.
- (void) publishWithCompletionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler |
Initiates the process of publishing streams to the streaming platform. Prior to calling this method, you must use the MCClient/connectWithCompletionHandler:
or MCClient/connectWithWebsocketUrl:jwt:completionHandler:
method to connect the publisher to the platform. When publishing, the SDK sets the AVAudioSession to the playAndRecord category, with voiceChat mode and allowBluetooth option. If desired, the application can configure the AVAudioSession with its own settings.
- (void) publishWithOptions: | (nonnull MCClientOptions *) | options | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Publish a stream with configuration options.
- (void) recordWithCompletionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler |
Starts recording a stream. See the Recording Docs for more information.
- (void) setCredentials: | (nonnull MCPublisherCredentials *) | credentials | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Sets the publisher credentials, providing authentication information required for connecting to the streaming platform.
- (void) unpublishWithCompletionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler |
Stops the process of publishing streams to the streaming platform. After calling this method, the SDK automatically terminates the connection between the publisher and the streaming platform.
- (void) unrecordWithCompletionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler |
Stops recording a stream. See the Recording Docs for more information on how to access the recordings.
|
readwritenonatomicweak |