MillicastSDK 1.8.4
|
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) | - project:withData:completionHandler: |
(void) | - unproject:completionHandler: |
(void) | - select:completionHandler: |
(void) | - addRemoteTrack:completionHandler: |
(void) | - getMid:completionHandler: |
(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: |
(void) | - enableFrameTransformer:completionHandler: |
(void) | - getMid:completionHandler: |
Properties | |
id< MCSubscriberDelegate > | delegate |
The Subscriber class manages the subscription to audio and video tracks from the Millicast platform.
- (void) addRemoteTrack: | (NSString *) | kind | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Dynamically add on new track to the subscriber so you can project another source into it. It will locally renegociate the SDP.
- (void) getCredentialsWithCompletionHandler: | (nonnull void(^)(MCSubscriberCredentials *_Nonnull)) | completionHandler |
Get the current viewer's credentials.
- (void) getMid: | (NSString *) | trackId | |
completionHandler: | (nonnull void(^)(NSString *, NSError *_Nullable)) | completionHandler | |
Get the transceiver mid associated to a track.
- (instancetype) initWithDelegate: | (id< MCSubscriberDelegate >) | delegate |
Initialize a subscriber.
- (void) isSubscribedWithCompletionHandler: | (nonnull void(^)(BOOL subscribed)) | completionHandler |
Checks whether the subscriber is currently subscribing to any media.
- (void) project: | (NSString *) | sourceId | |
withData: | (NSArray< MCProjectionData * > *) | projectionData | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Specify the source you want to receive. With the project method you can select and switch sources from the Millicast server and then forward the selected media to the subscriber, for each audio and video track.
- (void) select: | (MCLayerData *_Nullable) | layer | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Select a specific simulcast/SVC layer for a video track.
- (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) unproject: | (NSArray< NSString * > *) | mids | |
completionHandler: | (nonnull void(^)(NSError *_Nullable)) | completionHandler | |
Specify the media you want to stop receving.
- (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.
|
readwritenonatomicweak |