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 
830 - (int)enableLoopbackRecordingEx:(BOOL)enabled
831  deviceName:(NSString* _Nullable)deviceName
832  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
833 #endif
834 
849 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
850  connection:(AgoraRtcConnection* _Nonnull)connection;
851 
865 - (int)muteRecordingSignalEx:(BOOL)mute
866  connection:(AgoraRtcConnection* _Nonnull)connection;
867 
889 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
890  volume:(NSInteger)volume
891  connection:(AgoraRtcConnection* _Nonnull)connection;
892 
904 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
905  category:(NSString * _Nullable)category
906  event:(NSString * _Nullable)event
907  label:(NSString * _Nullable)label
908  value:(NSInteger)value
909  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
910 
948 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
949  smooth:(NSInteger)smooth
950  reportVad:(BOOL)reportVad
951  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
952 
980 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
981  pan:(double)pan
982  gain:(double)gain
983  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
984 
1001 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
1002  params:(AgoraSpatialAudioParams* _Nonnull)params
1003  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
1004 
1045 - (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.");
1046 
1062 - (int)addVideoWatermarkEx:(WatermarkConfig* _Nonnull)configs connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:connection:));
1063 
1080 - (int)removeVideoWatermarkEx:(NSString* _Nonnull)id connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeVideoWatermarkEx(_:connection:));
1081 
1082 
1092 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
1093 
1130 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
1131  reliable:(BOOL)reliable
1132  ordered:(BOOL)ordered
1133  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
1158 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
1159  config:(AgoraDataStreamConfig * _Nonnull)config
1160  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
1161 
1194 - (int)sendStreamMessageEx:(NSInteger)streamId
1195  data:(NSData * _Nonnull)data
1196  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
1197 
1217 - (int)sendRdtMessageEx:(NSInteger)uid
1218  type:(AgoraRdtStreamType)type
1219  data:(NSData * _Nonnull)data
1220  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendRdtMessageEx(_:type:data:connection:));
1221 
1235 - (int)sendMediaControlMessageEx:(NSInteger)uid
1236  data:(NSData * _Nonnull)data
1237  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendMediaControlMessageEx(_:data:connection:));
1238 
1256 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
1257  option:(AgoraStreamFallbackOptions)option
1258  connection:(AgoraRtcConnection* _Nonnull)connection;
1259 
1287 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
1288 
1315 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
1316 
1344 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
1345 
1371 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
1372 
1404 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
1405 
1434 - (NSInteger)takeSnapshotExWithConfig:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotExWithConfig(_:uid:config:));
1435 
1446 - (int)sendAudioMetadataEx:(AgoraRtcConnection * _Nonnull)connection metadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadataEx(_:metadata:));
1447 
1472 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
1473 
1506 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
1507  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
1508 
1543 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
1544  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
1545  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
1546 
1564 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
1565  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
1566 
1588 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
1589  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
1590 
1628 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
1629 
1654 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
1655 
1673 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
1674 
1691 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
1692 
1723 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
1724 
1732 - (int)setParametersEx:(NSString * _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setParametersEx(_:connection:));
1733 
1746 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
1747 
1748 
1778 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1779  soundId:(int)soundId
1780  filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:));
1781 
1812 - (int)preloadEffectEx:(AgoraRtcConnection* _Nonnull)connection
1813  soundId:(int)soundId
1814  filePath:(NSString* _Nonnull)filePath
1815  startPos:(int)startPos NS_SWIFT_NAME(preloadEffectEx(_:soundId:filePath:startPos:));
1816 
1865 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1866  soundId:(int)soundId
1867  filePath:(NSString* _Nonnull)filePath
1868  loopCount:(NSInteger)loopCount
1869  pitch:(double)pitch
1870  pan:(double)pan
1871  gain:(NSInteger)gain NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:));
1872 
1922 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1923  soundId:(int)soundId
1924  filePath:(NSString* _Nonnull)filePath
1925  loopCount:(NSInteger)loopCount
1926  pitch:(double)pitch
1927  pan:(double)pan
1928  gain:(NSInteger)gain
1929  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:startPos:));
1930 
1931 
1983 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
1984  soundId:(int)soundId
1985  filePath:(NSString* _Nonnull)filePath
1986  loopCount:(NSInteger)loopCount
1987  pitch:(double)pitch
1988  pan:(double)pan
1989  gain:(NSInteger)gain
1990  publish:(BOOL)publish NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:));
1991 
2044 - (int)playEffectEx:(AgoraRtcConnection* _Nonnull)connection
2045  soundId:(int)soundId
2046  filePath:(NSString* _Nonnull)filePath
2047  loopCount:(NSInteger)loopCount
2048  pitch:(double)pitch
2049  pan:(double)pan
2050  gain:(NSInteger)gain
2051  publish:(BOOL)publish
2052  startPos:(int)startPos NS_SWIFT_NAME(playEffectEx(_:soundId:filePath:loopCount:pitch:pan:gain:publish:startPos:));
2053 
2060 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
2061 
2068 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
2069 
2094 - (int)enableEncryptionEx:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
2095 @end
2096 
2097 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:3880
AgoraRdtStreamType
AgoraRdtStreamType
Reliable Data Transmission Tunnel message stream type.
Definition: AgoraEnumerates.h:5514
AgoraSimulcastStreamConfig
The configuration of the low-quality video stream.
Definition: AgoraObjects.h:3629
AgoraSimulcastConfig
Configure video streams of different quality levels.
Definition: AgoraObjects.h:3679
AgoraContentInspectConfig
Screenshot and upload configuration.
Definition: AgoraObjects.h:3806
WatermarkOptions
Watermark image configurations.
Definition: AgoraObjects.h:1702
AgoraRtcEngineKit.h
AgoraVideoRotation
AgoraVideoRotation
Definition: AgoraEnumerates.h:1376
AgoraLeaveChannelOptions
The options for leaving a channel.
Definition: AgoraObjects.h:2609
AgoraDataStreamConfig
The configurations for the data stream.
Definition: AgoraObjects.h:2895
AgoraUserInfo
The information of the user.
Definition: AgoraObjects.h:2799
AgoraVideoRenderMode
AgoraVideoRenderMode
Video display modes.
Definition: AgoraEnumerates.h:1314
AgoraEncryptionConfig
Built-in encryption configurations.
Definition: AgoraObjects.h:2765
AgoraChannelMediaRelayConfiguration
Configuration of cross channel media relay.
Definition: AgoraObjects.h:2947
AgoraRtcEngineKit(Ex)
The AgoraRtcEngineKitEx interface.
Definition: AgoraRtcEngineKitEx.h:17
AgoraVideoStreamType
AgoraVideoStreamType
The type of video streams.
Definition: AgoraEnumerates.h:1251
AgoraConnectionState
AgoraConnectionState
Connection states.
Definition: AgoraEnumerates.h:2633
AgoraObjects.h
AgoraRtcConnection
Contains connection information.
Definition: AgoraObjects.h:3853
AgoraSnapshotConfig
The snapshot configuration.
Definition: AgoraObjects.h:3834
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
The mode in which the video stream is sent.
Definition: AgoraEnumerates.h:4295
AgoraRtcVideoCanvas
Attributes of the video canvas object.
Definition: AgoraObjects.h:671
WatermarkConfig
Used to configure watermark-related information.
Definition: AgoraObjects.h:1771
AgoraChannelStats
Statistics of a call session.
Definition: AgoraObjects.h:1247