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
18 
94 - (int)joinChannelExByToken:(NSString* _Nullable)token
95  connection:(AgoraRtcConnection * _Nonnull)connection
96  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
97  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
98  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:connection:delegate:mediaOptions:joinSuccess:));
99 
194 - (int)joinChannelExByToken:(NSString* _Nullable)token
195  channelId:(NSString* _Nonnull)channelId
196  userAccount:(NSString* _Nonnull)userAccount
197  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
198  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
199  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:channelId:userAccount:delegate:mediaOptions:joinSuccess:));
200 
222 - (int)updateChannelExWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
223  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelEx(with:connection:));
224 
260 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
261  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:leaveChannelBlock:));
262 
283 - (int)leaveChannelEx:(NSString * _Nonnull)channelId
284  userAccount:(NSString * _Nonnull)userAccount
285  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:userAccount:leaveChannelBlock:));
286 
296 - (int)setDelegateEx:(id<AgoraRtcEngineDelegate> _Nullable)delegate connection:(AgoraRtcConnection * _Nonnull)connection;
297 
317 - (int)muteLocalAudioStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalAudioStreamEx(_:connection:));
337 - (int)muteLocalVideoStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalVideoStreamEx(_:connection:));
338 
379 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
380  options:(AgoraLeaveChannelOptions * _Nonnull)options
381  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
382 
404 - (int)leaveChannelEx:(NSString * _Nonnull)channelId
405  userAccount:(NSString * _Nonnull)userAccount
406  options:(AgoraLeaveChannelOptions * _Nonnull)options
407  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:userAccount:options:leaveChannelBlock:));
408 
427 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
428  mute:(BOOL)mute
429  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteAudioStreamEx(_:mute:connection:));
430 
453 - (int)muteAllRemoteAudioStreamsEx:(BOOL)mute
454  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteAudioStreamsEx(_:connection:));
455 
475 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
476  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setVideoEncoderConfigurationEx(_:connection:));
477 
478 
496 - (int)setRemoteRenderRotationEx:(NSUInteger)uid
497  rotation:(AgoraVideoRotation)rotation
498  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderRotationEx(_:rotation:connection:));
499 
528 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
529  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
530 
552 - (int)setRemoteRenderModeEx:(NSUInteger)uid
553  mode:(AgoraVideoRenderMode)mode
554  mirror:(AgoraVideoMirrorMode)mirror
555  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
556 
575 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
576  mute:(BOOL)mute
577  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
578 
595 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
596  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
597 
627 - (int)enableDualStreamModeEx:(BOOL)enabled
628  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
629  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:)) __deprecated_msg("use setDualStreamModeEx: instead.");
630 
666 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
667  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
668  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
669 
692 - (int)setSimulcastConfigEx:(AgoraSimulcastConfig*)simulcastConfig
693  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:connection:));
694 
733 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
734  type:(AgoraVideoStreamType)streamType
735  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
751 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
752  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
753  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
754 
770 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
771  connection:(AgoraRtcConnection * _Nonnull)connection
772  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
773 
792 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
793  connection:(AgoraRtcConnection * _Nonnull)connection
794  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
795 
807 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
808 
809 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
810 
834 - (int)enableLoopbackRecordingEx:(BOOL)enabled
835  deviceName:(NSString* _Nullable)deviceName
836  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:)) __attribute__((deprecated("Use createLoopbackAudioTrack: and publishLoopbackAudioTrackIds instead.")));
837 #endif
838 
853 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
854  connection:(AgoraRtcConnection* _Nonnull)connection;
855 
869 - (int)muteRecordingSignalEx:(BOOL)mute
870  connection:(AgoraRtcConnection* _Nonnull)connection;
871 
893 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
894  volume:(NSInteger)volume
895  connection:(AgoraRtcConnection* _Nonnull)connection;
896 
908 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
909  category:(NSString * _Nullable)category
910  event:(NSString * _Nullable)event
911  label:(NSString * _Nullable)label
912  value:(NSInteger)value
913  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
914 
952 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
953  smooth:(NSInteger)smooth
954  reportVad:(BOOL)reportVad
955  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
956 
984 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
985  pan:(double)pan
986  gain:(double)gain
987  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
988 
1005 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
1006  params:(AgoraSpatialAudioParams* _Nonnull)params
1007  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
1008 
1049 - (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.");
1050 
1066 - (int)addVideoWatermarkEx:(WatermarkConfig* _Nonnull)configs connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:connection:));
1067 
1084 - (int)removeVideoWatermarkEx:(NSString* _Nonnull)id connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeVideoWatermarkEx(_:connection:));
1085 
1086 
1096 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
1097 
1134 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
1135  reliable:(BOOL)reliable
1136  ordered:(BOOL)ordered
1137  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
1162 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
1163  config:(AgoraDataStreamConfig * _Nonnull)config
1164  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
1165 
1198 - (int)sendStreamMessageEx:(NSInteger)streamId
1199  data:(NSData * _Nonnull)data
1200  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
1201 
1221 - (int)sendRdtMessageEx:(NSInteger)uid
1222  type:(AgoraRdtStreamType)type
1223  data:(NSData * _Nonnull)data
1224  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendRdtMessageEx(_:type:data:connection:));
1225 
1239 - (int)sendMediaControlMessageEx:(NSInteger)uid
1240  data:(NSData * _Nonnull)data
1241  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendMediaControlMessageEx(_:data:connection:));
1242 
1260 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
1261  option:(AgoraStreamFallbackOptions)option
1262  connection:(AgoraRtcConnection* _Nonnull)connection;
1263 
1291 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
1292 
1319 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
1320 
1348 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
1349 
1375 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
1376 
1408 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
1409 
1438 - (NSInteger)takeSnapshotExWithConfig:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotExWithConfig(_:uid:config:));
1439 
1450 - (int)sendAudioMetadataEx:(AgoraRtcConnection * _Nonnull)connection metadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadataEx(_:metadata:));
1451 
1476 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
1477 
1510 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
1511  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
1512 
1547 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
1548  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
1549  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
1550 
1568 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
1569  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
1570 
1592 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
1593  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
1594 
1632 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
1633 
1658 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
1659 
1677 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
1678 
1695 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
1696 
1727 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
1728 
1736 - (int)setParametersEx:(NSString * _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setParametersEx(_:connection:));
1737 
1750 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
1751 
1752 
1782 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1783  soundId:(int)soundId
1784  filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:));
1785 
1816 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1817  soundId:(int)soundId
1818  filePath:(NSString* _Nonnull)filePath
1819  startPos:(int)startPos NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:startPos:));
1820 
1869 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1870  soundId:(int)soundId
1871  filePath:(NSString* _Nonnull)filePath
1872  loopCount:(NSInteger)loopCount
1873  pitch:(double)pitch
1874  pan:(double)pan
1875  gain:(NSInteger)gain NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:));
1876 
1926 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1927  soundId:(int)soundId
1928  filePath:(NSString* _Nonnull)filePath
1929  loopCount:(NSInteger)loopCount
1930  pitch:(double)pitch
1931  pan:(double)pan
1932  gain:(NSInteger)gain
1933  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:startPos:));
1934 
1935 
1987 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1988  soundId:(int)soundId
1989  filePath:(NSString* _Nonnull)filePath
1990  loopCount:(NSInteger)loopCount
1991  pitch:(double)pitch
1992  pan:(double)pan
1993  gain:(NSInteger)gain
1994  publish:(BOOL)publish NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:));
1995 
2048 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
2049  soundId:(int)soundId
2050  filePath:(NSString* _Nonnull)filePath
2051  loopCount:(NSInteger)loopCount
2052  pitch:(double)pitch
2053  pan:(double)pan
2054  gain:(NSInteger)gain
2055  publish:(BOOL)publish
2056  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:startPos:));
2057 
2064 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
2065 
2072 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
2073 
2098 - (int)enableEncryptionEx:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
2099 @end
2100 
2101 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
The AgoraRtcEngineDelegate protocol enables callback event notifications to your application.
Definition: AgoraRtcEngineDelegate.h:27
AgoraRtcChannelMediaOptions
The channel media options.
Definition: AgoraObjects.h:383
AgoraVideoSubscriptionOptions
Video subscription options.
Definition: AgoraObjects.h:3902
AgoraRdtStreamType
AgoraRdtStreamType
Reliable Data Transmission Tunnel message stream type.
Definition: AgoraEnumerates.h:5540
AgoraSimulcastStreamConfig
The configuration of the low-quality video stream.
Definition: AgoraObjects.h:3651
AgoraSimulcastConfig
Configure video streams of different quality levels.
Definition: AgoraObjects.h:3701
AgoraContentInspectConfig
Screenshot and upload configuration.
Definition: AgoraObjects.h:3828
WatermarkOptions
Watermark image configurations.
Definition: AgoraObjects.h:1724
AgoraRtcEngineKit.h
AgoraVideoRotation
AgoraVideoRotation
Definition: AgoraEnumerates.h:1402
AgoraLeaveChannelOptions
The options for leaving a channel.
Definition: AgoraObjects.h:2631
AgoraDataStreamConfig
The configurations for the data stream.
Definition: AgoraObjects.h:2917
AgoraUserInfo
The information of the user.
Definition: AgoraObjects.h:2821
AgoraVideoRenderMode
AgoraVideoRenderMode
Video display modes.
Definition: AgoraEnumerates.h:1340
AgoraEncryptionConfig
Built-in encryption configurations.
Definition: AgoraObjects.h:2787
AgoraChannelMediaRelayConfiguration
Configuration of cross channel media relay.
Definition: AgoraObjects.h:2969
AgoraRtcEngineKit(Ex)
The AgoraRtcEngineKitEx interface.
Definition: AgoraRtcEngineKitEx.h:17
AgoraVideoStreamType
AgoraVideoStreamType
The type of video streams.
Definition: AgoraEnumerates.h:1277
AgoraConnectionState
AgoraConnectionState
Connection states.
Definition: AgoraEnumerates.h:2659
AgoraObjects.h
AgoraRtcConnection
Contains connection information.
Definition: AgoraObjects.h:3875
AgoraSnapshotConfig
The snapshot configuration.
Definition: AgoraObjects.h:3856
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
The mode in which the video stream is sent.
Definition: AgoraEnumerates.h:4321
AgoraRtcVideoCanvas
Attributes of the video canvas object.
Definition: AgoraObjects.h:685
WatermarkConfig
Used to configure watermark-related information.
Definition: AgoraObjects.h:1793
AgoraChannelStats
Statistics of a call session.
Definition: AgoraObjects.h:1269