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
20 + (AgoraLiveChannelConfig *_Nonnull)defaultConfig NS_SWIFT_NAME(defaultConfig());
21 @end
22
27 @class AgoraLiveKit;
28
31 @protocol AgoraLiveDelegate <NSObject>
32 @optional
33
34
42 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didOccurError:(AgoraErrorCode)errorCode NS_SWIFT_NAME(liveKit(_:didOccurError:));
43
51 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didJoinChannel:(NSString *_Nonnull)channel withUid:(NSUInteger)uid elapsed:(NSInteger)elapsed NS_SWIFT_NAME(liveKit(_:didJoinChannel:withUid:elapsed:));
52
57 - (void)liveKitDidLeaveChannel:(AgoraLiveKit *_Nonnull)kit NS_SWIFT_NAME(liveKitDidLeaveChannel(_:));
58
66 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit didRejoinChannel:(NSString *_Nonnull)channel withUid:(NSUInteger)uid elapsed:(NSInteger)elapsed NS_SWIFT_NAME(liveKit(_:didRejoinChannel:withUid:elapsed:));
67
78 - (void)liveKitRequestToken:(AgoraLiveKit *_Nonnull)kit NS_SWIFT_NAME(liveKitRequestToken(_:));
79
91 - (void)liveKit:(AgoraLiveKit * _Nonnull)kit tokenPrivilegeWillExpire:(NSString * _Nonnull)token NS_SWIFT_NAME(liveKit(_:tokenPrivilegeWillExpire:));
92
93 // statistics
94
100 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit reportLiveStats:(AgoraChannelStats *_Nonnull)stats NS_SWIFT_NAME(liveKit(_:reportLiveStats:));
101 // network
102
110 - (void)liveKitConnectionDidInterrupted:(AgoraLiveKit *_Nonnull)kit NS_SWIFT_NAME(liveKitConnectionDidInterrupted(_:));
111
119 - (void)liveKitConnectionDidLost:(AgoraLiveKit *_Nonnull)kit NS_SWIFT_NAME(liveKitConnectionDidLost(_:));
120
128 - (void)liveKit:(AgoraLiveKit *_Nonnull)kit networkQuality:(NSUInteger)uid txQuality:(AgoraNetworkQuality)txQuality rxQuality:(AgoraNetworkQuality)rxQuality NS_SWIFT_NAME(liveKit(_:networkQuality:txQuality:rxQuality:));
129 @end
130
134 __attribute__((visibility("default"))) @interface AgoraLiveKit : NSObject
135
139 @property (weak, nonatomic) _Nullable id<AgoraLiveDelegate> delegate;
140
145 + (NSString *_Nonnull)getSdkVersion NS_SWIFT_NAME(getSdkVersion());
146
149 - (AgoraRtcEngineKit *_Nonnull)getRtcEngineKit NS_SWIFT_NAME(getRtcEngineKit());
150
157 + (instancetype _Nonnull)sharedLiveKitWithAppId:(NSString *_Nonnull)appId NS_SWIFT_NAME(sharedLiveKitWithAppId(_:));
158
159
176 + (void)destroy NS_SWIFT_NAME(destroy());
177
194 - (int)joinChannelByToken:(NSString *_Nullable)token
195 channelId:(NSString *_Nonnull)channelId
196 config:(AgoraLiveChannelConfig *_Nonnull)channelConfig
197 uid:(NSUInteger)uid NS_SWIFT_NAME(joinChannel(byToken:channelId:config:uid:));
198
204 - (int)leaveChannel NS_SWIFT_NAME(leaveChannel());
205
206
215 - (int)renewToken:(NSString*_Nonnull)token NS_SWIFT_NAME(renewToken(_:));
216
224 - (int)startPreview:(VIEW_CLASS *_Nonnull)view
225 renderMode:(AgoraVideoRenderMode)mode NS_SWIFT_NAME(startPreview(_:renderMode:));
226
231 - (int)stopPreview NS_SWIFT_NAME(stopPreview());
232
233 - (int)sendCustomReportMessage:(NSString * _Nullable)id
234 category:(NSString * _Nullable)category
235 event:(NSString * _Nullable)event
236 label:(NSString * _Nullable)label
237 value:(NSInteger)value
238 connectionId:(NSUInteger)connectionId NS_SWIFT_NAME(sendCustomReportMessage(_:category:event:label:value:connectionId:));
239
240 - (int)setLogLevel:(LogLevel)level NS_SWIFT_NAME(setLogLevel(_:));
241 @end
AgoraLivePublisher.h
AgoraLiveSubscriber.h
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:1813
AgoraLiveChannelConfig
Definition: AgoraLiveKit.h:18
AgoraLiveKit
Definition: AgoraLiveKit.h:135
AgoraRtcEngineKit.h
VIEW_CLASS
UIView VIEW_CLASS
Definition: AgoraObjects.h:15
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:825
+[AgoraLiveChannelConfig defaultConfig]
AgoraLiveChannelConfig *_Nonnull defaultConfig()
AgoraLiveChannelConfig::videoEnabled
BOOL videoEnabled
Definition: AgoraLiveKit.h:18
AgoraLiveDelegate-p
Definition: AgoraLiveKit.h:31
AgoraNetworkQuality
AgoraNetworkQuality
Definition: AgoraEnumerates.h:728
AgoraChannelStats
Definition: AgoraObjects.h:1019