Agora RTC Objective-C API Reference  Refactor
AgoraLiveKit.h
Go to the documentation of this file.
1 //
2 // AgoraLiveKit.h
3 // AgoraLiveKit
4 //
5 // Created by Junhao Wang
6 // Copyright (c) 2017 Agora. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
11 #import "AgoraLivePublisher.h"
12 #import "AgoraLiveSubscriber.h"
13 #import "AgoraRtcEngineKit.h"
14 
17 __attribute__((visibility("default"))) @interface AgoraLiveChannelConfig: NSObject
18 @property (assign, nonatomic) BOOL videoEnabled;
19 
21 @end
22 
27 @class AgoraLiveKit;
28 
31 @protocol AgoraLiveDelegate <NSObject>
32 @optional
33 
34 
42 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didOccurWarning:(AgoraWarningCode)warningCode;
43 
51 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didOccurError:(AgoraErrorCode)errorCode;
52 
60 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didJoinChannel:(NSString *_Nonnull)channel withUid:(NSUInteger)uid elapsed:(NSInteger) elapsed;
61 
66 - (void)liveKitDidLeaveChannel:(AgoraLiveKit *_Nonnull)kit;
67 
75 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didRejoinChannel:(NSString *_Nonnull)channel withUid:(NSUInteger)uid elapsed:(NSInteger) elapsed;
76 
87 - (void)liveKitRequestToken:(AgoraLiveKit *_Nonnull)kit;
88 
100 - (void)liveKit:(AgoraLiveKit * _Nonnull)kit tokenPrivilegeWillExpire:(NSString * _Nonnull)token;
101 
102 // statistics
103 
109 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit reportLiveStats:(AgoraChannelStats *_Nonnull)stats;
110 // network
111 
119 - (void)liveKitConnectionDidInterrupted:(AgoraLiveKit *_Nonnull)kit;
120 
128 - (void)liveKitConnectionDidLost:(AgoraLiveKit *_Nonnull)kit;
129 
137 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit networkQuality:(NSUInteger)uid txQuality:(AgoraNetworkQuality)txQuality rxQuality:(AgoraNetworkQuality)rxQuality;
138 @end
139 
143 __attribute__((visibility("default"))) @interface AgoraLiveKit : NSObject
144 
148 @property (weak, nonatomic) _Nullable id<AgoraLiveDelegate> delegate;
149 
154 + (NSString *_Nonnull)getSdkVersion;
155 
158 - (AgoraRtcEngineKit *_Nonnull)getRtcEngineKit;
159 
166 + (instancetype _Nonnull)sharedLiveKitWithAppId:(NSString *_Nonnull)appId;
167 
168 
185 + (void)destroy;
186 
203 - (int)joinChannelByToken:(NSString *_Nullable)token
204  channelId:(NSString *_Nonnull)channelId
205  config:(AgoraLiveChannelConfig *_Nonnull)channelConfig
206  uid:(NSUInteger)uid;
207 
213 - (int)leaveChannel;
214 
215 
224 - (int)renewToken:(NSString*_Nonnull)token;
225 
233 - (int)startPreview:(VIEW_CLASS *_Nonnull)view
234  renderMode:(AgoraVideoRenderMode)mode;
235 
240 - (int)stopPreview;
241 
242 - (int)sendCustomReportMessage:(NSString * _Nullable)id
243  category:(NSString * _Nullable)category
244  event:(NSString * _Nullable)event
245  label:(NSString * _Nullable)label
246  value:(NSInteger)value
247  connectionId:(NSUInteger)connectionId;
248 
249 - (int)setLogLevel:(LogLevel)level;
250 @end
AgoraLivePublisher.h
AgoraLiveSubscriber.h
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:1642
AgoraLiveChannelConfig
Definition: AgoraLiveKit.h:18
AgoraLiveKit
Definition: AgoraLiveKit.h:144
AgoraRtcEngineKit.h
VIEW_CLASS
UIView VIEW_CLASS
Definition: AgoraObjects.h:16
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:753
+[AgoraLiveChannelConfig defaultConfig]
AgoraLiveChannelConfig *_Nonnull defaultConfig()
AgoraLiveChannelConfig::videoEnabled
BOOL videoEnabled
Definition: AgoraLiveKit.h:18
AgoraLiveDelegate-p
Definition: AgoraLiveKit.h:31
AgoraNetworkQuality
AgoraNetworkQuality
Definition: AgoraEnumerates.h:689
AgoraChannelStats
Definition: AgoraObjects.h:686