Agora RTC Objective-C API Reference  Refactor
AgoraRtcEngineKitEx.h
Go to the documentation of this file.
1 //
2 // AgoraRtcEngineKitEx.h
3 // AgoraRtcEngineKit
4 //
5 // Copyright (c) 2020 Agora. All rights reserved.
6 // Created by LLF on 2020/3/9.
7 //
8 
9 #import "AgoraRtcEngineKit.h"
10 #import "AgoraObjects.h"
11 
12 #if TARGET_OS_IPHONE
13 #import <UIKit/UIKit.h>
14 #elif TARGET_OS_MAC
15 #import <AppKit/AppKit.h>
16 #endif
17 
18 NS_ASSUME_NONNULL_BEGIN
20 
42 - (int)joinChannelExByToken:(NSString* _Nullable)token
43  connection:(AgoraRtcConnection * _Nonnull)connection
44  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
45  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
46  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock;
47 
83 - (int)joinChannelExByToken:(NSString* _Nullable)token
84  channelId:(NSString* _Nonnull)channelId
85  userAccount:(NSString* _Nonnull)userAccount
86  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
87  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
88  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock;
89 
99 - (int)updateChannelExWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
100  connection:(AgoraRtcConnection * _Nonnull)connection;
101 
111 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
112  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
113 
126 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
127  mute:(BOOL)mute
128  connection:(AgoraRtcConnection * _Nonnull)connection;
129 
147 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
148  connection:(AgoraRtcConnection * _Nonnull)connection;
149 
160 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
161  connection:(AgoraRtcConnection * _Nonnull)connection;
162 
174 - (int)setRemoteRenderModeEx:(NSUInteger)uid
175  mode:(AgoraVideoRenderMode)mode
176  mirror:(AgoraVideoMirrorMode)mirror
177  connection:(AgoraRtcConnection * _Nonnull)connection;
178 
195 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
196  mute:(BOOL)mute
197  connection:(AgoraRtcConnection * _Nonnull)connection;
198 
213 - (int)enableDualStreamModeEx:(AgoraVideoSourceType)sourceType
214  enabled:(BOOL)enabled
215  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
216  connection:(AgoraRtcConnection* _Nonnull)connection;
217 
230 - (int)setDualStreamModeEx:(AgoraVideoSourceType)sourceType
231  mode:(AgoraSimulcastStreamMode)mode
232  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
233  connection:(AgoraRtcConnection* _Nonnull)connection;
234 
235 
256 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
257  type:(AgoraVideoStreamType)streamType
258  connection:(AgoraRtcConnection * _Nonnull)connection;
270 - (int)setRemoteVideo:(NSUInteger)uid SubscriptionOptionsEx:(AgoraVideoSubscriptionOptions* _Nonnull)options
271  connection:(AgoraRtcConnection* _Nonnull)connection;
272 
287 - (int)pushExternalEncodedVideoFrameEx:(NSData* _Nonnull)frame
288  info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
289  videoTrackId:(NSUInteger)videoTrackId;
290 
309 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId;
310 
321 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
322  connection:(AgoraRtcConnection * _Nonnull)connection
323  withError:(AgoraErrorCode* _Nullable)error;
324 
337 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
338  connection:(AgoraRtcConnection * _Nonnull)connection
339  withError:(AgoraErrorCode* _Nullable)error;
340 
348 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection;
349 
350 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
351 
371 - (int)enableLoopbackRecordingEx:(BOOL)enabled
372  deviceName:(NSString* _Nullable)deviceName
373  connection:(AgoraRtcConnection * _Nonnull)connection;;
374 #endif
375 
376 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
377  category:(NSString * _Nullable)category
378  event:(NSString * _Nullable)event
379  label:(NSString * _Nullable)label
380  value:(NSInteger)value
381  connection:(AgoraRtcConnection * _Nonnull)connection;
382 
383 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
384  smooth:(NSInteger)smooth
385  reportVad:(BOOL)reportVad
386  connection:(AgoraRtcConnection* _Nonnull)connection;
387 
412 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
413  pan:(double)pan
414  gain:(double)gain
415  connection:(AgoraRtcConnection * _Nonnull)connection;
416 
433 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
434  params:(AgoraSpatialAudioParams* _Nonnull)params
435  connection:(AgoraRtcConnection* _Nonnull)connection;
436 
463 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection;
464 
471 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection;
472 
497 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
498  reliable:(BOOL)reliable
499  ordered:(BOOL)ordered
500  connection:(AgoraRtcConnection * _Nonnull)connection;
511 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
512  config:(AgoraDataStreamConfig * _Nonnull)config
513  connection:(AgoraRtcConnection * _Nonnull)connection;
514 
539 - (int)sendStreamMessageEx:(NSInteger)streamId
540  data:(NSData * _Nonnull)data
541  connection:(AgoraRtcConnection * _Nonnull)connection;
542 
561 - (int)setSubscribeAudioBlacklistEx:(NSArray <NSNumber *> *_Nonnull)blacklist connection:(AgoraRtcConnection * _Nonnull)connection;
562 
578 - (int)setSubscribeAudioWhitelistEx:(NSArray <NSNumber *> *_Nonnull)whitelist connection:(AgoraRtcConnection * _Nonnull)connection;
579 
593 - (int)setSubscribeVideoBlacklistEx:(NSArray <NSNumber *> *_Nonnull)blacklist connection:(AgoraRtcConnection * _Nonnull)connection;
594 
610 - (int)setSubscribeVideoWhitelistEx:(NSArray <NSNumber *> *_Nonnull)whitelist connection:(AgoraRtcConnection * _Nonnull)connection;
611 
612 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath;
613 @end
614 
615 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineKit.h:610
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:230
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:2603
AgoraVideoFrame
Definition: AgoraObjects.h:1525
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:2500
WatermarkOptions
Definition: AgoraObjects.h:1151
AgoraVideoSourceType
AgoraVideoSourceType
Definition: AgoraEnumerates.h:2372
AgoraRtcEngineKit.h
AgoraDataStreamConfig
Definition: AgoraObjects.h:2006
AgoraUserInfo
Definition: AgoraObjects.h:1954
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:810
AgoraEncodedVideoFrameInfo
Definition: AgoraObjects.h:2623
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:19
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:792
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1670
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:2581
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2428
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:423
AgoraChannelStats
Definition: AgoraObjects.h:841