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 
13 NS_ASSUME_NONNULL_BEGIN
15 
37 - (int)joinChannelExByToken:(NSString* _Nullable)token
38  connection:(AgoraRtcConnection * _Nonnull)connection
39  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
40  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
41  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:connection:delegate:mediaOptions:joinSuccess:));
42 
78 - (int)joinChannelExByToken:(NSString* _Nullable)token
79  channelId:(NSString* _Nonnull)channelId
80  userAccount:(NSString* _Nonnull)userAccount
81  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
82  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
83  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:channelId:userAccount:delegate:mediaOptions:joinSuccess:));
84 
94 - (int)updateChannelExWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
95  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelEx(with:connection:));
96 
106 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
107  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:leaveChannelBlock:));
108 
129 - (int)leaveChannelEx:(NSString * _Nonnull)channelId
130  userAccount:(NSString * _Nonnull)userAccount
131  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:userAccount:leaveChannelBlock:));
132 
142 - (int)setDelegateEx:(id<AgoraRtcEngineDelegate> _Nullable)delegate connection:(AgoraRtcConnection * _Nonnull)connection;
143 
157 - (int)muteLocalAudioStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalAudioStreamEx(_:connection:));
171 - (int)muteLocalVideoStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalVideoStreamEx(_:connection:));
172 
183 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
184  options:(AgoraLeaveChannelOptions * _Nonnull)options
185  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
186 
208 - (int)leaveChannelEx:(NSString * _Nonnull)channelId
209  userAccount:(NSString * _Nonnull)userAccount
210  options:(AgoraLeaveChannelOptions * _Nonnull)options
211  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:userAccount:options:leaveChannelBlock:));
212 
225 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
226  mute:(BOOL)mute
227  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteAudioStreamEx(_:mute:connection:));
228 
242 - (int)muteAllRemoteAudioStreamsEx:(BOOL)mute
243  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteAudioStreamsEx(_:connection:));
244 
262 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
263  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setVideoEncoderConfigurationEx(_:connection:));
264 
275 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
276  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
277 
289 - (int)setRemoteRenderModeEx:(NSUInteger)uid
290  mode:(AgoraVideoRenderMode)mode
291  mirror:(AgoraVideoMirrorMode)mirror
292  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
293 
310 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
311  mute:(BOOL)mute
312  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
313 
327 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
328  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
329 
345 - (int)enableDualStreamModeEx:(BOOL)enabled
346  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
347  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:)) __deprecated_msg("use setDualStreamModeEx: instead.");
348 
360 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
361  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
362  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
363 
379 - (int)setSimulcastConfigEx:(AgoraSimulcastConfig*)simulcastConfig
380  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:connection:));
381 
402 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
403  type:(AgoraVideoStreamType)streamType
404  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
416 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
417  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
418  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
419 
430 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
431  connection:(AgoraRtcConnection * _Nonnull)connection
432  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
433 
446 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
447  connection:(AgoraRtcConnection * _Nonnull)connection
448  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
449 
457 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
458 
459 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
460 
480 - (int)enableLoopbackRecordingEx:(BOOL)enabled
481  deviceName:(NSString* _Nullable)deviceName
482  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
483 #endif
484 
499 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
500  connection:(AgoraRtcConnection* _Nonnull)connection;
501 
515 - (int)muteRecordingSignalEx:(BOOL)mute
516  connection:(AgoraRtcConnection* _Nonnull)connection;
517 
540 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
541  volume:(NSInteger)volume
542  connection:(AgoraRtcConnection* _Nonnull)connection;
543 
544 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
545  category:(NSString * _Nullable)category
546  event:(NSString * _Nullable)event
547  label:(NSString * _Nullable)label
548  value:(NSInteger)value
549  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
550 
551 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
552  smooth:(NSInteger)smooth
553  reportVad:(BOOL)reportVad
554  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
555 
580 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
581  pan:(double)pan
582  gain:(double)gain
583  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
584 
601 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
602  params:(AgoraSpatialAudioParams* _Nonnull)params
603  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
604 
631 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:));
632 
639 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
640 
665 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
666  reliable:(BOOL)reliable
667  ordered:(BOOL)ordered
668  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
679 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
680  config:(AgoraDataStreamConfig * _Nonnull)config
681  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
682 
707 - (int)sendStreamMessageEx:(NSInteger)streamId
708  data:(NSData * _Nonnull)data
709  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
710 
728 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
729  option:(AgoraStreamFallbackOptions)option
730  connection:(AgoraRtcConnection* _Nonnull)connection;
731 
750 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
751 
767 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
768 
782 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
783 
799 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
800 
830 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
831 
857 - (NSInteger)takeSnapshotExWithConfig:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotExWithConfig(_:uid:config:));
858 
869 - (int)sendAudioMetadataEx:(AgoraRtcConnection * _Nonnull)connection metadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadataEx(_:metadata:));
870 
882 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
883 
892 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
893  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
894 
905 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
906  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
907  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
908 
919 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
920  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
921 
929 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
930  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
931 
945 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
946 
961 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
962 
974 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
975 
987 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
988 
1005 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
1006 
1014 - (int)setParametersEx:(NSString * _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setParametersEx(_:connection:));
1015 
1027 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
1028 
1035 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
1036 
1043 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
1044 
1075 - (int)enableEncryptionEx:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
1076 @end
1077 
1078 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineDelegate.h:27
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:300
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:3168
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:3017
AgoraSimulcastConfig
Definition: AgoraObjects.h:3051
AgoraContentInspectConfig
Definition: AgoraObjects.h:3118
WatermarkOptions
Definition: AgoraObjects.h:1398
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:2145
AgoraDataStreamConfig
Definition: AgoraObjects.h:2347
AgoraUserInfo
Definition: AgoraObjects.h:2281
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:843
AgoraEncryptionConfig
Definition: AgoraObjects.h:2262
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2376
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:14
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:813
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1907
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:3134
AgoraSnapshotConfig
Definition: AgoraObjects.h:3127
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2931
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:523
AgoraChannelStats
Definition: AgoraObjects.h:1033