Agora RTC Objective-C API Reference Refactor

AgoraRtcEngineDelegate2.h
Go to the documentation of this file.
1 //
2 // AgoraRtcEngineKit2.h
3 // AgoraRtcEngineKit
4 //
5 // Created by Sting Feng on 2015-8-11.
6 // Copyright (c) 2015 Agora. All rights reserved.
7 //
8
9 #import "AgoraBaseDelegate.h"
10 #import "AgoraEnumerates.h"
11
12 @class AgoraRtcEngineKit;
13
14 @protocol AgoraRtcEngineDelegate2 <NSObject, AgoraBaseDelegate>
15 @optional
16
17 #pragma mark Local user common delegates
18
26 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didJoinChannel:(NSString * _Nonnull)channelId withUid:(NSString * _Nonnull)userId elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:didJoinChannel:withUid:elapsed:));
27
36 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didRejoinChannel:(NSString * _Nonnull)channelId withUid:(NSString * _Nonnull)userId elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:didRejoinChannel:withUid:elapsed:));
37
46 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine networkQuality:(NSString * _Nonnull)userId txQuality:(AgoraNetworkQuality)txQuality rxQuality:(AgoraNetworkQuality)rxQuality NS_SWIFT_NAME(rtcEngine(_:networkQuality:txQuality:rxQuality:));
47
48 #pragma mark Remote user common delegates
49
56 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didJoinedOfUid:(NSString * _Nonnull)userId elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:didJoinedOfUid:elapsed:));
57
65 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didOfflineOfUid:(NSString * _Nonnull)userId reason:(AgoraUserOfflineReason)reason NS_SWIFT_NAME(rtcEngine(_:didOfflineOfUid:reason:));
66
75 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine receiveStreamMessageFromUid:(NSString * _Nonnull)userId streamId:(NSInteger)streamId data:(NSData * _Nonnull)data NS_SWIFT_NAME(rtcEngine(_:receiveStreamMessageFromUid:streamId:data:));
76
87 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didOccurStreamMessageErrorFromUid:(NSString * _Nonnull)userId streamId:(NSInteger)streamId error:(NSInteger)error missed:(NSInteger)missed cached:(NSInteger)cached NS_SWIFT_NAME(rtcEngine(_:didOccurStreamMessageErrorFromUid:streamId:error:missed:cached:));
88
89 #pragma mark Local user audio delegates
90
106 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine localAudioStateChanged:(AgoraAudioLocalState)state error:(AgoraAudioLocalError)error NS_SWIFT_NAME(rtcEngine(_:localAudioStateChanged:error:));
107
108 #pragma mark Remote user audio delegates
109
116 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstRemoteAudioFrameOfUid:(NSString * _Nonnull)userId elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:firstRemoteAudioFrameOfUid:elapsed:));
117
136 - (void)rtcEngine:(AgoraRtcEngineKit* _Nonnull)engine firstRemoteAudioFrameDecodedOfUid:(NSString * _Nonnull)uid elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:firstRemoteAudioFrameDecodedOfUid:elapsed:));
137
138
159 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine remoteAudioStateChangedOfUid:(NSString * _Nonnull)userId state:(AgoraAudioRemoteState)state reason:(AgoraAudioRemoteReason)reason elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:remoteAudioStateChangedOfUid:state:reason:elapsed:));
160
167 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine activeSpeaker:(NSString * _Nonnull)speakerUid NS_SWIFT_NAME(rtcEngine(_:activeSpeaker:));
168
178 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine audioQualityOfUid:(NSString * _Nonnull)userId quality:(AgoraNetworkQuality)quality delay:(NSUInteger)delay lost:(NSUInteger)lost NS_SWIFT_NAME(rtcEngine(_:audioQualityOfUid:quality:delay:lost:));
179
189 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didAudioSubscribeStateChange:(NSString * _Nonnull)channelId
190 uid:(unsigned int)uid
191 oldState:(AgoraStreamSubscribeState)oldState
192 newState:(AgoraStreamSubscribeState)newState
193 elapseSinceLastState:(int)elapseSinceLastState NS_SWIFT_NAME(rtcEngine(_:didAudioSubscribeStateChange:uid:oldState:newState:elapseSinceLastState:));
194
203 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didAudioPublishStateChange:(NSString * _Nonnull)channelId
204 oldState:(AgoraStreamPublishState)oldState
205 newState:(AgoraStreamPublishState)newState
206 elapseSinceLastState:(int)elapseSinceLastState NS_SWIFT_NAME(rtcEngine(_:didAudioPublishStateChange:oldState:newState:elapseSinceLastState:));
207
208 #pragma mark Remote user video delegates
209
217 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstRemoteVideoDecodedOfUid:(NSString * _Nonnull)userId size:(CGSize)size elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:firstRemoteVideoDecodedOfUid:size:elapsed:));
218
227 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstRemoteVideoFrameOfUid:(NSString * _Nonnull)userId size:(CGSize)size elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:firstRemoteVideoFrameOfUid:size:elapsed:));
228
237 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine videoSizeChangedOfSourceType:(AgoraVideoSourceType)sourceType uid:(NSString * _Nonnull)uid size:(CGSize)size rotation:(NSInteger)rotation NS_SWIFT_NAME(rtcEngine(_:videoSizeChangedOf:uid:size:rotation:));
238 - (void)rtcEngine:(AgoraRtcEngineKit* _Nonnull)engine contentInspectResult:(AgoraContentInspectResult)result NS_SWIFT_NAME(rtcEngine(_:contentInspectResult:));
239 - (void)rtcEngine:(AgoraRtcEngineKit* _Nonnull)engine snapshotTaken:(NSUInteger)uid filePath:(NSString* _Nonnull)filePath width:(NSInteger)width height:(NSInteger)height errCode:(NSInteger)errCode NS_SWIFT_NAME(rtcEngine(_:snapshotTaken:filePath:width:height:errCode:));
251 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine localVideoStateChangedOfState:(AgoraVideoLocalState)state
252 error:(AgoraLocalVideoStreamError)error
253 sourceType:(AgoraVideoSourceType)source NS_SWIFT_NAME(rtcEngine(_:localVideoStateChangedOf:error:sourceType:));
254
275 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine remoteVideoStateChangedOfUid:(NSString * _Nonnull)userId state:(AgoraVideoRemoteState)state reason:(AgoraVideoRemoteReason)reason elapsed:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:remoteVideoStateChangedOfUid:state:reason:elapsed:));
276
284 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didAudioMuted:(BOOL)muted byUid:(NSString * _Nonnull)userId NS_SWIFT_NAME(rtcEngine(_:didAudioMuted:byUid:));
285
293 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didVideoMuted:(BOOL)muted byUid:(NSString * _Nonnull)userId NS_SWIFT_NAME(rtcEngine(_:didVideoMuted:byUid:));
294
302 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didVideoEnabled:(BOOL)enabled byUid:(NSString * _Nonnull)userId NS_SWIFT_NAME(rtcEngine(_:didVideoEnabled:byUid:));
303
311 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didLocalVideoEnabled:(BOOL)enabled byUid:(NSString * _Nonnull)userId NS_SWIFT_NAME(rtcEngine(_:didLocalVideoEnabled:byUid:));
312
320 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine remoteUserStateChangedOfUid:(NSString * _Nonnull)userId state:(NSUInteger)state NS_SWIFT_NAME(rtcEngine(_:remoteUserStateChangedOfUid:state:));
321
322 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine publishingRequestReceivedFromUid:(NSString * _Nonnull)userId NS_SWIFT_NAME(rtcEngine(_:publishingRequestReceivedFromUid:));
323 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine publishingRequestAnsweredByOwner:(NSString * _Nonnull)userId accepted:(BOOL)accepted error:(AgoraErrorCode)error NS_SWIFT_NAME(rtcEngine(_:publishingRequestAnsweredByOwner:accepted:error:));
324 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine unpublishingRequestReceivedFromOwner:(NSString * _Nonnull)userId NS_SWIFT_NAME(rtcEngine(_:unpublishingRequestReceivedFromOwner:));
325 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine streamInjectedStatusOfUrl:(NSString * _Nonnull)url uid:(NSString * _Nonnull)userId status:(AgoraInjectStreamStatus)status NS_SWIFT_NAME(rtcEngine(_:streamInjectedStatusOfUrl:uid:status:));
326
330 - (void)rtcEngineIntraRequestReceived:(AgoraRtcEngineKit *_Nonnull)engine NS_SWIFT_NAME(rtcEngineIntraRequestReceived(_:));
331
336 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine uplinkNetworkInfoUpdate:(AgoraUplinkNetworkInfo *_Nonnull)bweInfo NS_SWIFT_NAME(rtcEngine(_:uplinkNetworkInfoUpdate:));
337
342 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine downlinkNetworkInfoUpdate:(AgoraDownlinkNetworkInfo *_Nonnull)networkInfo NS_SWIFT_NAME(rtcEngine(_:downlinkNetworkInfoUpdate:));
343
344 #pragma mark Connection state delegates
345
351 - (void)rtcEngine:(AgoraRtcEngineKit* _Nonnull)engine connectionChangedToState:(AgoraConnectionState)state reason:(AgoraConnectionChangedReason)reason NS_SWIFT_NAME(rtcEngine(_:connectionChangedTo:reason:));
352
361 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine wlAccMessage:(AgoraWlAccReason)reason action:(AgoraWlAccAction)action wlAccMsg:(NSString * _Nonnull)wlAccMsg NS_SWIFT_NAME(rtcEngine(_:wlAccMessage:action:wlAccMsg:));
362
370 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine wlAccStats:(AgoraWlAccStats * _Nonnull)currentStats averageStats:(AgoraWlAccStats * _Nonnull)averageStats NS_SWIFT_NAME(rtcEngine(_:wlAccStats:averageStats:));
371
378 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine networkTypeChanged:(AgoraNetworkType)type NS_SWIFT_NAME(rtcEngine(_:networkTypeChanged:));
379
386 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine permissionError:(AgoraPermissionType)type NS_SWIFT_NAME(rtcEngine(_:permissionError:));
387
396 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine
397 channelMediaRelayStateDidChange:(AgoraChannelMediaRelayState)state
398 error:(AgoraChannelMediaRelayError)error NS_SWIFT_NAME(rtcEngine(_:channelMediaRelayStateDidChange:error:));
399
405 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine
406 didReceiveChannelMediaRelayEvent:(AgoraChannelMediaRelayEvent)event NS_SWIFT_NAME(rtcEngine(_:didReceive:));
407
417 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didVideoSubscribeStateChange:(NSString * _Nonnull)channelId
418 uid:(unsigned int)uid
419 oldState:(AgoraStreamSubscribeState)oldState
420 newState:(AgoraStreamSubscribeState)newState
421 elapseSinceLastState:(int)elapseSinceLastState NS_SWIFT_NAME(rtcEngine(_:didVideoSubscribeStateChange:uid:oldState:newState:elapseSinceLastState:));
422
432 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didVideoPublishStateChange:(NSString * _Nonnull)channelId
433 sourceType:(AgoraVideoSourceType)source
434 oldState:(AgoraStreamPublishState)oldState
435 newState:(AgoraStreamPublishState)newState
436 elapseSinceLastState:(int)elapseSinceLastState NS_SWIFT_NAME(rtcEngine(_:didVideoPublishStateChange:sourceType:oldState:newState:elapseSinceLastState:));
437
438 #pragma mark Rhythm Player Delegates Methods
439
440 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didRhythmPlayerStateChanged:(AgoraRhythmPlayerState)state
441 errorCode:(AgoraRhythmPlayerError)errorCode NS_SWIFT_NAME(rtcEngine(_:didRhythmPlayerStateChanged:errorCode:));
442
443 #pragma mark Local Video Transcoder Delegates Methods
444
450 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didLocalVideoTranscoderErrorWithStream:(AgoraTranscodingVideoStream * _Nonnull )stream
451 errorCode:(AgoraVideoTranscoderError)errorCode NS_SWIFT_NAME(rtcEngine(_:didLocalVideoTranscoderErrorWithStream:errorCode:));
452 @end
AgoraLocalVideoStreamError
AgoraLocalVideoStreamError
Definition: AgoraEnumerates.h:905
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:1813
AgoraConnectionChangedReason
AgoraConnectionChangedReason
Definition: AgoraEnumerates.h:2012
AgoraWlAccAction
AgoraWlAccAction
Definition: AgoraEnumerates.h:3238
AgoraVideoTranscoderError
AgoraVideoTranscoderError
Definition: AgoraEnumerates.h:3126
AgoraBaseDelegate-p
Definition: AgoraBaseDelegate.h:12
AgoraPermissionType
AgoraPermissionType
Definition: AgoraEnumerates.h:2907
AgoraUserOfflineReason
AgoraUserOfflineReason
Definition: AgoraEnumerates.h:603
AgoraAudioRemoteReason
AgoraAudioRemoteReason
Definition: AgoraEnumerates.h:1180
AgoraWlAccReason
AgoraWlAccReason
Definition: AgoraEnumerates.h:3224
AgoraUplinkNetworkInfo
Definition: AgoraObjects.h:2060
AgoraEnumerates.h
AgoraRhythmPlayerState
AgoraRhythmPlayerState
Definition: AgoraEnumerates.h:3094
AgoraChannelMediaRelayEvent
AgoraChannelMediaRelayEvent
Definition: AgoraEnumerates.h:2433
AgoraVideoRemoteReason
AgoraVideoRemoteReason
Definition: AgoraEnumerates.h:982
AgoraAudioLocalState
AgoraAudioLocalState
Definition: AgoraEnumerates.h:1047
AgoraTranscodingVideoStream
Definition: AgoraObjects.h:2476
AgoraAudioRemoteState
AgoraAudioRemoteState
Definition: AgoraEnumerates.h:1148
AgoraChannelMediaRelayState
AgoraChannelMediaRelayState
Definition: AgoraEnumerates.h:2416
AgoraWlAccStats
Definition: AgoraObjects.h:3196
AgoraVideoLocalState
AgoraVideoLocalState
Definition: AgoraEnumerates.h:885
AgoraVideoSourceType
AgoraVideoSourceType
Definition: AgoraEnumerates.h:2634
AgoraChannelMediaRelayError
AgoraChannelMediaRelayError
Definition: AgoraEnumerates.h:2474
AgoraRhythmPlayerError
AgoraRhythmPlayerError
Definition: AgoraEnumerates.h:3110
AgoraRtcEngineDelegate2-p
Definition: AgoraRtcEngineDelegate2.h:14
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1808
AgoraContentInspectResult
AgoraContentInspectResult
Definition: AgoraEnumerates.h:3057
AgoraBaseDelegate.h
AgoraStreamPublishState
AgoraStreamPublishState
Definition: AgoraEnumerates.h:2526
AgoraDownlinkNetworkInfo
Definition: AgoraObjects.h:2070
AgoraNetworkType
AgoraNetworkType
Definition: AgoraEnumerates.h:1832
AgoraAudioLocalError
AgoraAudioLocalError
Definition: AgoraEnumerates.h:1069
AgoraNetworkQuality
AgoraNetworkQuality
Definition: AgoraEnumerates.h:728
AgoraStreamSubscribeState
AgoraStreamSubscribeState
Definition: AgoraEnumerates.h:2516