MillicastSDK 2.0.0
Loading...
Searching...
No Matches
viewer.h
Go to the documentation of this file.
2#import <MillicastSDK/exports.h>
4
5
6NS_ASSUME_NONNULL_BEGIN
7
8// Forward declarations ///////////////////////////////////////////////////////
9@class MCVideoTrack;
10@class MCAudioTrack;
11@class MCRTSRemoteTrack;
17@class MCSubscriber;
18
22MILLICAST_API @interface MCStreamStoppedEvent: NSObject {
23 NSString *description;
24}
26@property (copy) NSString* _Nonnull description;
27@end
28
33@protocol MCSubscriberDelegate <MCDelegate>
34
35@optional
40- (void) subscriber:(nonnull MCSubscriber*) subscriber didReceiveStreamStoppedEvent:(nonnull MCStreamStoppedEvent*) event
41 NS_SWIFT_NAME(subscriber(_:didReceiveStreamStoppedEvent:));
42
47- (void) subscriber:(nonnull MCSubscriber*) subscriber didReceiveRTSRemoteTrack:(nonnull MCRTSRemoteTrack *) rtsRemoteTrack
48 NS_SWIFT_NAME(subscriber(_:didReceiveRTSRemoteTrack:));
49@end
50
54
56@property (nonatomic, strong, nonnull) NSString* streamName;
57
59@property (nonatomic, strong, nonnull) NSString* token;
60
62@property (nonatomic, strong, nonnull) NSString* accountId;
63
65@property (nonatomic, strong, nonnull) NSString* apiUrl;
66
67@end
68
70MILLICAST_API @interface MCSubscriber : NSObject <MCClient>
71
72@property(nonatomic, weak) id<MCSubscriberDelegate> delegate;
73
79- (instancetype) initWithDelegate:(id<MCSubscriberDelegate> _Nullable) delegate;
80
87- (void) subscribeWithCompletionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
88
94- (void) subscribeWithOptions: (MCClientOptions *) opts completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
95
99- (void) isSubscribedWithCompletionHandler:(nonnull void (^)(BOOL subscribed)) completionHandler;
100
107- (void) unsubscribeWithCompletionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
108
113- (void) audioTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCRTSRemoteAudioTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
114
119- (void) videoTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCRTSRemoteVideoTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
120
128- (void) addWebrtcRemoteTrackWithKind:(MCRemoteTrackKind)kind
129 cname:(NSString * _Nonnull)cname
130 completionHandler:(nonnull void (^)(MCWebrtcRemoteTrack * _Nullable, NSError * _Nullable)) completionHandler
131 NS_SWIFT_NAME(addWebrtcRemoteTrack(kind:cname:completionHandler:));
132
137- (void) webrtcAudioTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCWebrtcRemoteAudioTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
138
143- (void) webrtcVideoTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCWebrtcRemoteAudioTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
144
149- (void) setCredentials: (nonnull MCSubscriberCredentials*) credentials completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
150
154- (void) getCredentialsWithCompletionHandler:(nonnull void (^)(MCSubscriberCredentials * _Nonnull)) completionHandler;
155
156@end
157
158NS_ASSUME_NONNULL_END
#define MILLICAST_API
Definition exports.h:51
Manages and plays a single audio resource.
Definition track.h:51
The MCClientOptions class gathers options for the client.
Definition client.h:209
The RTS logical track's audio interface.
Definition rts_remote_track.h:269
Definition rts_remote_track.h:119
The RTS logical track's video interface.
Definition rts_remote_track.h:211
Definition viewer.h:22
NSString * description
Definition viewer.h:23
Definition viewer.h:54
NSString * token
The subscribing token.
Definition viewer.h:59
NSString * apiUrl
The subscribe API URL.
Definition viewer.h:65
NSString * accountId
Your Millicast account ID.
Definition viewer.h:62
NSString * streamName
The name of the stream you want to subscribe to.
Definition viewer.h:56
The Subscriber class manages the subscription to audio and video tracks from the Millicast platform.
Definition viewer.h:70
Responsible for managing video capture session from a video source.
Definition track.h:33
The webrtc logical track's audio interface.
Definition webrtc_remote_track.h:187
Definition webrtc_remote_track.h:61
The webrtc logical track's video interface.
Definition webrtc_remote_track.h:100
The Client base that contains common methods between MCPublisher and MCSubscriber.
Definition client.h:297