Agora RTC Objective-C API Reference  Refactor
AgoraLiveSubscriber.h
Go to the documentation of this file.
1 //
2 // AgoraLiveSubscriber.h
3 // AgoraLiveKit
4 //
5 // Created by Sting Feng on 2015-8-11.
6 // Copyright (c) 2015 Agora. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "AgoraObjects.h"
11 
14 @class AgoraLiveKit;
15 
18 @class AgoraLiveSubscriber;
19 
22 @protocol AgoraLiveSubscriberDelegate <NSObject>
23 @optional
24 
25 // Subscriber
26 
34 - (void)subscriber: (AgoraLiveSubscriber *_Nonnull)subscriber publishedByHostUid:(NSUInteger)uid streamType:(AgoraMediaType) type;
35 
43 - (void)subscriber: (AgoraLiveSubscriber *_Nonnull)subscriber streamTypeChangedTo:(AgoraMediaType) type byHostUid:(NSUInteger)uid;
44 
45 // Unmute, offline
46 
53 - (void)subscriber: (AgoraLiveSubscriber *_Nonnull)subscriber unpublishedByHostUid:(NSUInteger)uid;
54 
55 // Video
63 - (void)subscriber:(AgoraLiveSubscriber *_Nonnull)subscriber firstRemoteVideoDecodedOfHostUid:(NSUInteger)uid size:(CGSize)size elapsed:(NSInteger)elapsed;
64 
73 - (void)subscriber:(AgoraLiveSubscriber *_Nonnull)subscriber videoSizeChangedOfHostUid:(NSUInteger)uid size:(CGSize)size rotation:(NSInteger)rotation;
74 @end
75 
76 
81 __attribute__((visibility("default"))) @interface AgoraLiveSubscriber: NSObject // AgoraLiveSubscriber
82 
89 -(instancetype _Nonnull)initWithLiveKit:(AgoraLiveKit * _Nonnull)kit;
90 
91 
97 -(void)setDelegate:(_Nullable id<AgoraLiveSubscriberDelegate>)delegate;
98 
108 - (void)subscribeToHostUid:(NSUInteger)uid
109  mediaType:(AgoraMediaType)mediaType
110  view:(VIEW_CLASS *_Nullable)view
111  renderMode:(AgoraVideoRenderMode)mode
112  videoType:(AgoraVideoStreamType)videoType;
113 
119 -(void)unsubscribeToHostUid:(NSUInteger)uid;
120 
121 @end
AgoraLiveSubscriber
Definition: AgoraLiveSubscriber.h:82
AgoraLiveKit
Definition: AgoraLiveKit.h:144
VIEW_CLASS
UIView VIEW_CLASS
Definition: AgoraObjects.h:16
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:810
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:792
AgoraObjects.h
AgoraLiveSubscriberDelegate-p
Definition: AgoraLiveSubscriber.h:22