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 
118 - (int)setDelegateEx:(id<AgoraRtcEngineDelegate> _Nullable)delegate connection:(AgoraRtcConnection * _Nonnull)connection;
119 
133 - (int)muteLocalAudioStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalAudioStreamEx(_:connection:));
147 - (int)muteLocalVideoStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalVideoStreamEx(_:connection:));
148 
159 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
160  options:(AgoraLeaveChannelOptions * _Nonnull)options
161  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
162 
175 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
176  mute:(BOOL)mute
177  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteAudioStreamEx(_:mute:connection:));
178 
192 - (int)muteAllRemoteAudioStreamsEx:(BOOL)mute
193  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteAudioStreamsEx(_:connection:));
194 
212 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
213  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setVideoEncoderConfigurationEx(_:connection:));
214 
225 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
226  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
227 
239 - (int)setRemoteRenderModeEx:(NSUInteger)uid
240  mode:(AgoraVideoRenderMode)mode
241  mirror:(AgoraVideoMirrorMode)mirror
242  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
243 
260 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
261  mute:(BOOL)mute
262  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
263 
277 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
278  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
279 
295 - (int)enableDualStreamModeEx:(BOOL)enabled
296  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
297  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:)) __deprecated_msg("use setDualStreamModeEx: instead.");
298 
310 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
311  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
312  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
313 
329 - (int)setSimulcastConfigEx:(AgoraSimulcastConfig*)simulcastConfig
330  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:connection:));
331 
352 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
353  type:(AgoraVideoStreamType)streamType
354  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
366 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
367  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
368  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
369 
380 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
381  connection:(AgoraRtcConnection * _Nonnull)connection
382  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
383 
396 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
397  connection:(AgoraRtcConnection * _Nonnull)connection
398  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
399 
407 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
408 
409 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
410 
430 - (int)enableLoopbackRecordingEx:(BOOL)enabled
431  deviceName:(NSString* _Nullable)deviceName
432  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
433 #endif
434 
449 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
450  connection:(AgoraRtcConnection* _Nonnull)connection;
451 
465 - (int)muteRecordingSignalEx:(BOOL)mute
466  connection:(AgoraRtcConnection* _Nonnull)connection;
467 
490 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
491  volume:(NSInteger)volume
492  connection:(AgoraRtcConnection* _Nonnull)connection;
493 
494 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
495  category:(NSString * _Nullable)category
496  event:(NSString * _Nullable)event
497  label:(NSString * _Nullable)label
498  value:(NSInteger)value
499  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
500 
501 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
502  smooth:(NSInteger)smooth
503  reportVad:(BOOL)reportVad
504  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
505 
530 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
531  pan:(double)pan
532  gain:(double)gain
533  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
534 
551 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
552  params:(AgoraSpatialAudioParams* _Nonnull)params
553  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
554 
581 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:));
582 
589 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
590 
615 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
616  reliable:(BOOL)reliable
617  ordered:(BOOL)ordered
618  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
629 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
630  config:(AgoraDataStreamConfig * _Nonnull)config
631  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
632 
657 - (int)sendStreamMessageEx:(NSInteger)streamId
658  data:(NSData * _Nonnull)data
659  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
660 
678 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
679  option:(AgoraStreamFallbackOptions)option
680  connection:(AgoraRtcConnection* _Nonnull)connection;
681 
700 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
701 
717 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
718 
732 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
733 
749 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
750 
751 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
752 
763 - (int)sendAudioMetadataEx:(AgoraRtcConnection * _Nonnull)connection metadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadataEx(_:metadata:));
775 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
776 
785 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
786  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
787 
798 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
799  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
800  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
801 
812 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
813  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
814 
822 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
823  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
824 
838 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
839 
854 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
855 
867 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
868 
880 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
881 
898 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
899 
907 - (int)setParametersEx:(NSString * _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setParametersEx(_:connection:));
908 
920 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
921 
928 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
929 
936 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
937 
968 - (int)enableEncryptionEx:(bool)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
969 @end
970 
971 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineDelegate.h:27
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:301
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:3074
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:2928
AgoraSimulcastConfig
Definition: AgoraObjects.h:2962
AgoraContentInspectConfig
Definition: AgoraObjects.h:3029
WatermarkOptions
Definition: AgoraObjects.h:1399
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:2124
AgoraDataStreamConfig
Definition: AgoraObjects.h:2324
AgoraUserInfo
Definition: AgoraObjects.h:2258
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:844
AgoraEncryptionConfig
Definition: AgoraObjects.h:2239
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2353
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:14
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:814
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1854
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:3040
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2830
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:524
AgoraChannelStats
Definition: AgoraObjects.h:1034