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 
387 - (int)setSimulcastConfigEx:(AgoraSimulcastConfig*)simulcastConfig
388  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:connection:));
389 
410 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
411  type:(AgoraVideoStreamType)streamType
412  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
424 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
425  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
426  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
427 
438 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
439  connection:(AgoraRtcConnection * _Nonnull)connection
440  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
441 
454 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
455  connection:(AgoraRtcConnection * _Nonnull)connection
456  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
457 
465 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
466 
467 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
468 
488 - (int)enableLoopbackRecordingEx:(BOOL)enabled
489  deviceName:(NSString* _Nullable)deviceName
490  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
491 #endif
492 
507 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
508  connection:(AgoraRtcConnection* _Nonnull)connection;
509 
523 - (int)muteRecordingSignalEx:(BOOL)mute
524  connection:(AgoraRtcConnection* _Nonnull)connection;
525 
548 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
549  volume:(NSInteger)volume
550  connection:(AgoraRtcConnection* _Nonnull)connection;
551 
552 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
553  category:(NSString * _Nullable)category
554  event:(NSString * _Nullable)event
555  label:(NSString * _Nullable)label
556  value:(NSInteger)value
557  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
558 
559 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
560  smooth:(NSInteger)smooth
561  reportVad:(BOOL)reportVad
562  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
563 
588 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
589  pan:(double)pan
590  gain:(double)gain
591  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
592 
609 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
610  params:(AgoraSpatialAudioParams* _Nonnull)params
611  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
612 
639 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:)) __deprecated_msg("use addVideoWatermark:config connection instead.");
640 
652 - (int)addVideoWatermarkEx:(WatermarkConfig* _Nonnull)configs connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:connection:));
653 
665 - (int)removeVideoWatermarkEx:(NSString* _Nonnull)id connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeVideoWatermarkEx(_:connection:));
666 
667 
674 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
675 
700 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
701  reliable:(BOOL)reliable
702  ordered:(BOOL)ordered
703  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
714 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
715  config:(AgoraDataStreamConfig * _Nonnull)config
716  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
717 
742 - (int)sendStreamMessageEx:(NSInteger)streamId
743  data:(NSData * _Nonnull)data
744  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
745 
765 - (int)sendRdtMessageEx:(NSInteger)uid
766  type:(AgoraRdtStreamType)type
767  data:(NSData * _Nonnull)data
768  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendRdtMessageEx(_:type:data:connection:));
769 
783 - (int)sendMediaControlMessageEx:(NSInteger)uid
784  data:(NSData * _Nonnull)data
785  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendMediaControlMessageEx(_:data:connection:));
786 
804 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
805  option:(AgoraStreamFallbackOptions)option
806  connection:(AgoraRtcConnection* _Nonnull)connection;
807 
826 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
827 
843 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
844 
858 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
859 
875 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
876 
906 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
907 
933 - (NSInteger)takeSnapshotExWithConfig:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotExWithConfig(_:uid:config:));
934 
945 - (int)sendAudioMetadataEx:(AgoraRtcConnection * _Nonnull)connection metadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadataEx(_:metadata:));
946 
958 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
959 
968 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
969  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
970 
981 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
982  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
983  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
984 
995 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
996  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
997 
1005 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
1006  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
1007 
1021 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
1022 
1037 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
1038 
1050 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
1051 
1063 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
1064 
1081 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
1082 
1090 - (int)setParametersEx:(NSString * _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setParametersEx(_:connection:));
1091 
1103 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
1104 
1131 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1132  soundId:(int)soundId
1133  filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:));
1134 
1163 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1164  soundId:(int)soundId
1165  filePath:(NSString* _Nonnull)filePath
1166  startPos:(int)startPos NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:startPos:));
1167 
1193 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1194  soundId:(int)soundId
1195  filePath:(NSString* _Nonnull)filePath
1196  loopCount:(NSInteger)loopCount
1197  pitch:(double)pitch
1198  pan:(double)pan
1199  gain:(NSInteger)gain NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:));
1200 
1228 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1229  soundId:(int)soundId
1230  filePath:(NSString* _Nonnull)filePath
1231  loopCount:(NSInteger)loopCount
1232  pitch:(double)pitch
1233  pan:(double)pan
1234  gain:(NSInteger)gain
1235  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:startPos:));
1236 
1237 
1266 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1267  soundId:(int)soundId
1268  filePath:(NSString* _Nonnull)filePath
1269  loopCount:(NSInteger)loopCount
1270  pitch:(double)pitch
1271  pan:(double)pan
1272  gain:(NSInteger)gain
1273  publish:(BOOL)publish NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:));
1274 
1308 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1309  soundId:(int)soundId
1310  filePath:(NSString* _Nonnull)filePath
1311  loopCount:(NSInteger)loopCount
1312  pitch:(double)pitch
1313  pan:(double)pan
1314  gain:(NSInteger)gain
1315  publish:(BOOL)publish
1316  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:startPos:));
1317 
1324 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
1325 
1332 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
1333 
1364 - (int)enableEncryptionEx:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
1365 @end
1366 
1367 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineDelegate.h:27
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:304
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:3366
AgoraRdtStreamType
AgoraRdtStreamType
Reliable Data Transmission Tunnel message stream type.
Definition: AgoraEnumerates.h:3970
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:3196
AgoraSimulcastConfig
Definition: AgoraObjects.h:3237
AgoraContentInspectConfig
Definition: AgoraObjects.h:3316
WatermarkOptions
Definition: AgoraObjects.h:1506
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:2310
AgoraDataStreamConfig
Definition: AgoraObjects.h:2512
AgoraUserInfo
Definition: AgoraObjects.h:2446
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:857
AgoraEncryptionConfig
Definition: AgoraObjects.h:2427
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2541
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:14
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:827
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1925
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:3332
AgoraSnapshotConfig
Definition: AgoraObjects.h:3325
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:3134
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:570
WatermarkConfig
Configuration settings for applying a watermark.
Definition: AgoraObjects.h:1565
AgoraChannelStats
Definition: AgoraObjects.h:1096