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 
91 - (int)joinChannelExByToken:(NSString* _Nullable)token
92  connection:(AgoraRtcConnection * _Nonnull)connection
93  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
94  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
95  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:connection:delegate:mediaOptions:joinSuccess:));
96 
191 - (int)joinChannelExByToken:(NSString* _Nullable)token
192  channelId:(NSString* _Nonnull)channelId
193  userAccount:(NSString* _Nonnull)userAccount
194  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
195  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
196  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:channelId:userAccount:delegate:mediaOptions:joinSuccess:));
197 
219 - (int)updateChannelExWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
220  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelEx(with:connection:));
221 
257 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
258  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:leaveChannelBlock:));
259 
280 - (int)leaveChannelEx:(NSString * _Nonnull)channelId
281  userAccount:(NSString * _Nonnull)userAccount
282  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:userAccount:leaveChannelBlock:));
283 
293 - (int)setDelegateEx:(id<AgoraRtcEngineDelegate> _Nullable)delegate connection:(AgoraRtcConnection * _Nonnull)connection;
294 
314 - (int)muteLocalAudioStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalAudioStreamEx(_:connection:));
334 - (int)muteLocalVideoStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalVideoStreamEx(_:connection:));
335 
376 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
377  options:(AgoraLeaveChannelOptions * _Nonnull)options
378  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
379 
401 - (int)leaveChannelEx:(NSString * _Nonnull)channelId
402  userAccount:(NSString * _Nonnull)userAccount
403  options:(AgoraLeaveChannelOptions * _Nonnull)options
404  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:userAccount:options:leaveChannelBlock:));
405 
424 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
425  mute:(BOOL)mute
426  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteAudioStreamEx(_:mute:connection:));
427 
450 - (int)muteAllRemoteAudioStreamsEx:(BOOL)mute
451  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteAudioStreamsEx(_:connection:));
452 
474 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
475  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setVideoEncoderConfigurationEx(_:connection:));
476 
506 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
507  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
508 
530 - (int)setRemoteRenderModeEx:(NSUInteger)uid
531  mode:(AgoraVideoRenderMode)mode
532  mirror:(AgoraVideoMirrorMode)mirror
533  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
534 
553 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
554  mute:(BOOL)mute
555  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
556 
573 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
574  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
575 
605 - (int)enableDualStreamModeEx:(BOOL)enabled
606  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
607  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:)) __deprecated_msg("use setDualStreamModeEx: instead.");
608 
644 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
645  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
646  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
647 
670 - (int)setSimulcastConfigEx:(AgoraSimulcastConfig*)simulcastConfig
671  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:connection:));
672 
711 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
712  type:(AgoraVideoStreamType)streamType
713  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
729 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
730  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
731  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
732 
748 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
749  connection:(AgoraRtcConnection * _Nonnull)connection
750  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
751 
770 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
771  connection:(AgoraRtcConnection * _Nonnull)connection
772  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
773 
785 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
786 
787 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
788 
808 - (int)enableLoopbackRecordingEx:(BOOL)enabled
809  deviceName:(NSString* _Nullable)deviceName
810  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
811 #endif
812 
827 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
828  connection:(AgoraRtcConnection* _Nonnull)connection;
829 
843 - (int)muteRecordingSignalEx:(BOOL)mute
844  connection:(AgoraRtcConnection* _Nonnull)connection;
845 
867 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
868  volume:(NSInteger)volume
869  connection:(AgoraRtcConnection* _Nonnull)connection;
870 
882 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
883  category:(NSString * _Nullable)category
884  event:(NSString * _Nullable)event
885  label:(NSString * _Nullable)label
886  value:(NSInteger)value
887  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
888 
926 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
927  smooth:(NSInteger)smooth
928  reportVad:(BOOL)reportVad
929  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
930 
958 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
959  pan:(double)pan
960  gain:(double)gain
961  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
962 
979 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
980  params:(AgoraSpatialAudioParams* _Nonnull)params
981  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
982 
1023 - (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.");
1024 
1040 - (int)addVideoWatermarkEx:(WatermarkConfig* _Nonnull)configs connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:connection:));
1041 
1058 - (int)removeVideoWatermarkEx:(NSString* _Nonnull)id connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeVideoWatermarkEx(_:connection:));
1059 
1060 
1070 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
1071 
1109 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
1110  reliable:(BOOL)reliable
1111  ordered:(BOOL)ordered
1112  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
1138 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
1139  config:(AgoraDataStreamConfig * _Nonnull)config
1140  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
1141 
1174 - (int)sendStreamMessageEx:(NSInteger)streamId
1175  data:(NSData * _Nonnull)data
1176  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
1177 
1197 - (int)sendRdtMessageEx:(NSInteger)uid
1198  type:(AgoraRdtStreamType)type
1199  data:(NSData * _Nonnull)data
1200  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendRdtMessageEx(_:type:data:connection:));
1201 
1215 - (int)sendMediaControlMessageEx:(NSInteger)uid
1216  data:(NSData * _Nonnull)data
1217  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendMediaControlMessageEx(_:data:connection:));
1218 
1236 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
1237  option:(AgoraStreamFallbackOptions)option
1238  connection:(AgoraRtcConnection* _Nonnull)connection;
1239 
1267 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
1268 
1295 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
1296 
1324 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
1325 
1351 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
1352 
1384 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
1385 
1414 - (NSInteger)takeSnapshotExWithConfig:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotExWithConfig(_:uid:config:));
1415 
1426 - (int)sendAudioMetadataEx:(AgoraRtcConnection * _Nonnull)connection metadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadataEx(_:metadata:));
1427 
1452 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
1453 
1486 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
1487  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
1488 
1523 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
1524  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
1525  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
1526 
1544 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
1545  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
1546 
1568 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
1569  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
1570 
1608 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
1609 
1634 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
1635 
1653 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
1654 
1671 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
1672 
1703 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
1704 
1712 - (int)setParametersEx:(NSString * _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setParametersEx(_:connection:));
1713 
1726 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
1727 
1728 
1754 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1755  soundId:(int)soundId
1756  filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:));
1757 
1784 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1785  soundId:(int)soundId
1786  filePath:(NSString* _Nonnull)filePath
1787  startPos:(int)startPos NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:startPos:));
1788 
1833 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1834  soundId:(int)soundId
1835  filePath:(NSString* _Nonnull)filePath
1836  loopCount:(NSInteger)loopCount
1837  pitch:(double)pitch
1838  pan:(double)pan
1839  gain:(NSInteger)gain NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:));
1840 
1886 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1887  soundId:(int)soundId
1888  filePath:(NSString* _Nonnull)filePath
1889  loopCount:(NSInteger)loopCount
1890  pitch:(double)pitch
1891  pan:(double)pan
1892  gain:(NSInteger)gain
1893  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:startPos:));
1894 
1895 
1943 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1944  soundId:(int)soundId
1945  filePath:(NSString* _Nonnull)filePath
1946  loopCount:(NSInteger)loopCount
1947  pitch:(double)pitch
1948  pan:(double)pan
1949  gain:(NSInteger)gain
1950  publish:(BOOL)publish NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:));
1951 
2000 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
2001  soundId:(int)soundId
2002  filePath:(NSString* _Nonnull)filePath
2003  loopCount:(NSInteger)loopCount
2004  pitch:(double)pitch
2005  pan:(double)pan
2006  gain:(NSInteger)gain
2007  publish:(BOOL)publish
2008  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:startPos:));
2009 
2016 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
2017 
2024 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
2025 
2050 - (int)enableEncryptionEx:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
2051 @end
2052 
2053 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineDelegate.h:27
AgoraRtcChannelMediaOptions
The channel media options.
Definition: AgoraObjects.h:383
AgoraVideoSubscriptionOptions
Video subscription options.
Definition: AgoraObjects.h:3815
AgoraRdtStreamType
AgoraRdtStreamType
Reliable Data Transmission Tunnel message stream type.
Definition: AgoraEnumerates.h:5416
AgoraSimulcastStreamConfig
The configuration of the low-quality video stream.
Definition: AgoraObjects.h:3568
AgoraSimulcastConfig
Configure video streams of different quality levels.
Definition: AgoraObjects.h:3618
AgoraContentInspectConfig
Screenshot and upload configuration.
Definition: AgoraObjects.h:3745
WatermarkOptions
Watermark image configurations.
Definition: AgoraObjects.h:1689
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
The options for leaving a channel.
Definition: AgoraObjects.h:2567
AgoraDataStreamConfig
The configurations for the data stream.
Definition: AgoraObjects.h:2834
AgoraUserInfo
The information of the user.
Definition: AgoraObjects.h:2738
AgoraVideoRenderMode
AgoraVideoRenderMode
Video display modes.
Definition: AgoraEnumerates.h:1256
AgoraEncryptionConfig
Built-in encryption configurations.
Definition: AgoraObjects.h:2704
AgoraChannelMediaRelayConfiguration
Configuration of cross channel media relay.
Definition: AgoraObjects.h:2886
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:14
AgoraVideoStreamType
AgoraVideoStreamType
The type of video streams.
Definition: AgoraEnumerates.h:1193
AgoraConnectionState
AgoraConnectionState
Connection states.
Definition: AgoraEnumerates.h:2555
AgoraObjects.h
AgoraRtcConnection
Contains connection information.
Definition: AgoraObjects.h:3788
AgoraSnapshotConfig
The snapshot configuration.
Definition: AgoraObjects.h:3773
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
The mode in which the video stream is sent.
Definition: AgoraEnumerates.h:4197
AgoraRtcVideoCanvas
Attributes of the video canvas object.
Definition: AgoraObjects.h:663
WatermarkConfig
Used to configure watermark-related information.
Definition: AgoraObjects.h:1758
AgoraChannelStats
Statistics of a call session.
Definition: AgoraObjects.h:1234