MillicastSDK 2.0.0
|
The Subscriber class manages the subscription to audio and video tracks from the Millicast platform. More...
#import <viewer.h>
Instance Methods | |
(instancetype) | - initWithDelegate: |
(void) | - subscribeWithCompletionHandler: |
(void) | - subscribeWithOptions:completionHandler: |
(void) | - isSubscribedWithCompletionHandler: |
(void) | - unsubscribeWithCompletionHandler: |
(void) | - audioTracksWithCompletionHandler: |
(void) | - videoTracksWithCompletionHandler: |
(void) | - addWebrtcRemoteTrackWithKind:cname:completionHandler: |
(void) | - webrtcAudioTracksWithCompletionHandler: |
(void) | - webrtcVideoTracksWithCompletionHandler: |
(void) | - setCredentials:completionHandler: |
(void) | - getCredentialsWithCompletionHandler: |
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< MCSubscriberDelegate > | delegate |
The Subscriber class manages the subscription to audio and video tracks from the Millicast platform.
- (void) addWebrtcRemoteTrackWithKind: | (MCRemoteTrackKind) | kind | |
cname: | (NSString *_Nonnull) | cname | |
completionHandler: | (addWebrtcRemoteTrack(kind:cname:completionHandler:)) | NS_SWIFT_NAME | |
Create a webrtc remote track that can be used for advanced projection use cases
- (void) audioTracksWithCompletionHandler: | (nonnull void(^)(NSArray< MCRTSRemoteAudioTrack * > *_Nullable, NSError *_Nullable)) | completionHandler |
List all available rts remote audio tracks received so far.
- (void) getCredentialsWithCompletionHandler: | (nonnull void(^)(MCSubscriberCredentials *_Nonnull)) | completionHandler |
Get the current viewer's credentials.
- (instancetype) initWithDelegate: | (id< MCSubscriberDelegate > _Nullable) | delegate |
Initialize a subscriber.
- (void) isSubscribedWithCompletionHandler: | (nonnull void(^)(BOOL subscribed)) | completionHandler |
Checks whether the subscriber is currently subscribing to any media.
- (void) setCredentials: | (nonnull MCSubscriberCredentials *) | credentials | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Sets the credentials, providing authentication information required for connecting to the streaming platform.
- (void) subscribeWithCompletionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler |
Initiates the subscription process from the Millicast platform. Prior to calling this method, you must use the MCClient/connectWithCompletionHandler:
or similar to connect the subscriber to the platform. Successful subscription results in calling the onSubscribed method of the Listener.
- (void) subscribeWithOptions: | (MCClientOptions *) | opts | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Subscribes to a stream with options.
- (void) unsubscribeWithCompletionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler |
Stops the subscription process indicating to the streaming server that the subscriber is no longer interested in receiving audio and video content. After calling this method, the SDK automatically terminates the connection between the subscriber and the streaming platform.
- (void) videoTracksWithCompletionHandler: | (nonnull void(^)(NSArray< MCRTSRemoteVideoTrack * > *_Nullable, NSError *_Nullable)) | completionHandler |
List all available rts remote video tracks received so far.
- (void) webrtcAudioTracksWithCompletionHandler: | (nonnull void(^)(NSArray< MCWebrtcRemoteAudioTrack * > *_Nullable, NSError *_Nullable)) | completionHandler |
List all available webrtc remote audio tracks created so far.
- (void) webrtcVideoTracksWithCompletionHandler: | (nonnull void(^)(NSArray< MCWebrtcRemoteAudioTrack * > *_Nullable, NSError *_Nullable)) | completionHandler |
List all available webrtc remote video tracks created so far.
|
readwritenonatomicweak |