MillicastSDK 2.2.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;
19
23MILLICAST_API @interface MCStreamStoppedEvent: NSObject {
24 NSString *description;
25}
27@property (copy) NSString* _Nonnull description;
28@end
29
34@protocol MCSubscriberDelegate <MCDelegate>
35
36@optional
41- (void) subscriber:(nonnull MCSubscriber*) subscriber didReceiveStreamStoppedEvent:(nonnull MCStreamStoppedEvent*) event
42 NS_SWIFT_NAME(subscriber(_:didReceiveStreamStoppedEvent:));
43
48- (void) subscriber:(nonnull MCSubscriber*) subscriber didReceiveRTSRemoteTrack:(nonnull MCRTSRemoteTrack *) rtsRemoteTrack
49 NS_SWIFT_NAME(subscriber(_:didReceiveRTSRemoteTrack:));
50
59- (void)subscriber:(nonnull MCSubscriber*)subscriber didReceiveStats:(nonnull MCSubscriberStats *)stats
60 NS_SWIFT_NAME(subscriber(_:didReceiveStats:));
61
62@end
63
67
69@property (nonatomic, strong, nonnull) NSString* streamName;
70
72@property (nonatomic, strong, nonnull) NSString* token;
73
75@property (nonatomic, strong, nonnull) NSString* accountId;
76
78@property (nonatomic, strong, nonnull) NSString* apiUrl;
79
80@end
81
83MILLICAST_API @interface MCSubscriber : NSObject <MCClient>
84
85@property(nonatomic, weak) id<MCSubscriberDelegate> delegate;
86
92- (instancetype) initWithDelegate:(id<MCSubscriberDelegate> _Nullable) delegate;
93
100- (void) subscribeWithCompletionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
101
107- (void) subscribeWithOptions: (MCClientOptions *) opts completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
108
112- (void) isSubscribedWithCompletionHandler:(nonnull void (^)(BOOL subscribed)) completionHandler;
113
120- (void) unsubscribeWithCompletionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
121
126- (void) audioTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCRTSRemoteAudioTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
127
132- (void) videoTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCRTSRemoteVideoTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
133
141- (void) addWebrtcRemoteTrackWithKind:(MCRemoteTrackKind)kind
142 cname:(NSString * _Nonnull)cname
143 completionHandler:(nonnull void (^)(MCWebrtcRemoteTrack * _Nullable, NSError * _Nullable)) completionHandler
144 NS_SWIFT_NAME(addWebrtcRemoteTrack(kind:cname:completionHandler:));
145
150- (void) webrtcAudioTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCWebrtcRemoteAudioTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
151
156- (void) webrtcVideoTracksWithCompletionHandler:(nonnull void (^)(NSArray<MCWebrtcRemoteAudioTrack *> * _Nullable, NSError * _Nullable)) completionHandler;
157
162- (void) setCredentials: (nonnull MCSubscriberCredentials*) credentials completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
163
167- (void) getCredentialsWithCompletionHandler:(nonnull void (^)(MCSubscriberCredentials * _Nonnull)) completionHandler;
168@end
169
170NS_ASSUME_NONNULL_END
#define MILLICAST_API
Definition exports.h:51
Manages and plays a single audio resource.
Definition track.h:51
The RTS logical track's audio interface.
Definition rts_remote_track.h:283
Definition viewer.h:23
NSString * description
Definition viewer.h:24
Definition MCSubscriberStats.h:33
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
void audioTracksWithCompletionHandler
Definition viewer.h:126
void subscribeWithCompletionHandler
Definition viewer.h:100
void addWebrtcRemoteTrackWithKind
Definition viewer.h:143
void webrtcVideoTracksWithCompletionHandler
Definition viewer.h:156
void isSubscribedWithCompletionHandler
Definition viewer.h:112
void webrtcAudioTracksWithCompletionHandler
Definition viewer.h:150
void unsubscribeWithCompletionHandler
Definition viewer.h:120
void getCredentialsWithCompletionHandler
Definition viewer.h:167
void videoTracksWithCompletionHandler
Definition viewer.h:132
void setCredentials
Definition viewer.h:162
void NSError *_Nullable completionHandler
Definition viewer.h:126
void subscribeWithOptions
Definition viewer.h:107