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 #if TARGET_OS_IPHONE
13 #import <UIKit/UIKit.h>
14 #elif TARGET_OS_MAC
15 #import <AppKit/AppKit.h>
16 #endif
17 
18 NS_ASSUME_NONNULL_BEGIN
20 
42 - (int)joinChannelExByToken:(NSString* _Nullable)token
43  connection:(AgoraRtcConnection * _Nonnull)connection
44  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
45  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
46  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:connection:delegate:mediaOptions:joinSuccess:));
47 
83 - (int)joinChannelExByToken:(NSString* _Nullable)token
84  channelId:(NSString* _Nonnull)channelId
85  userAccount:(NSString* _Nonnull)userAccount
86  delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate
87  mediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
88  joinSuccess:(void(^ _Nullable)(NSString* _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannelEx(byToken:channelId:userAccount:delegate:mediaOptions:joinSuccess:));
89 
99 - (int)updateChannelExWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions
100  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelEx(with:connection:));
101 
111 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
112  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelEx(_:leaveChannelBlock:));
113 
123 - (int)setDelegateEx:(id<AgoraRtcEngineDelegate> _Nullable)delegate connection:(AgoraRtcConnection * _Nonnull)connection;
124 
138 - (int)muteLocalAudioStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalAudioStreamEx(_:connection:));
152 - (int)muteLocalVideoStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalVideoStreamEx(_:connection:));
153 
164 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
165  options:(AgoraLeaveChannelOptions * _Nonnull)options
166  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
167 
180 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
181  mute:(BOOL)mute
182  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteAudioStreamEx(_:mute:connection:));
183 
197 - (int)muteAllRemoteAudioStreamsEx:(BOOL)mute
198  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteAudioStreamsEx(_:connection:));
199 
217 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
218  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setVideoEncoderConfigurationEx(_:connection:));
219 
230 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
231  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
232 
244 - (int)setRemoteRenderModeEx:(NSUInteger)uid
245  mode:(AgoraVideoRenderMode)mode
246  mirror:(AgoraVideoMirrorMode)mirror
247  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
248 
265 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
266  mute:(BOOL)mute
267  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
268 
282 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
283  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
284 
300 - (int)enableDualStreamModeEx:(BOOL)enabled
301  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
302  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:)) __deprecated_msg("use setDualStreamModeEx: instead.");
303 
315 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
316  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
317  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
318 
319 
340 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
341  type:(AgoraVideoStreamType)streamType
342  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
354 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
355  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
356  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
357 
372 - (int)pushExternalEncodedVideoFrameEx:(NSData* _Nonnull)frame
373  info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
374  videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrameEx(_:info:videoTrackId:));
375 
394 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
395 
406 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
407  connection:(AgoraRtcConnection * _Nonnull)connection
408  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
409 
422 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
423  connection:(AgoraRtcConnection * _Nonnull)connection
424  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
425 
433 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
434 
435 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
436 
456 - (int)enableLoopbackRecordingEx:(BOOL)enabled
457  deviceName:(NSString* _Nullable)deviceName
458  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
459 #endif
460 
475 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
476  connection:(AgoraRtcConnection* _Nonnull)connection;
477 
491 - (int)muteRecordingSignalEx:(BOOL)mute
492  connection:(AgoraRtcConnection* _Nonnull)connection;
493 
516 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
517  volume:(NSInteger)volume
518  connection:(AgoraRtcConnection* _Nonnull)connection;
519 
520 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
521  category:(NSString * _Nullable)category
522  event:(NSString * _Nullable)event
523  label:(NSString * _Nullable)label
524  value:(NSInteger)value
525  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
526 
527 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
528  smooth:(NSInteger)smooth
529  reportVad:(BOOL)reportVad
530  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
531 
556 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
557  pan:(double)pan
558  gain:(double)gain
559  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
560 
577 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
578  params:(AgoraSpatialAudioParams* _Nonnull)params
579  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
580 
607 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:));
608 
615 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
616 
641 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
642  reliable:(BOOL)reliable
643  ordered:(BOOL)ordered
644  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
655 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
656  config:(AgoraDataStreamConfig * _Nonnull)config
657  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
658 
683 - (int)sendStreamMessageEx:(NSInteger)streamId
684  data:(NSData * _Nonnull)data
685  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
686 
704 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
705  option:(AgoraStreamFallbackOptions)option
706  connection:(AgoraRtcConnection* _Nonnull)connection;
707 
726 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
727 
743 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
744 
758 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
759 
775 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
776 
777 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
778 
790 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
791 
800 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
801  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
802 
813 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
814  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
815  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
816 
827 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
828  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
829 
837 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
838  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
839 
853 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
854 
868 - (int)startChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startChannelMediaRelayEx(_:connection:)) __deprecated_msg("use startOrUpdateChannelMediaRelayEx instead.");
869 
882 - (int)updateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelMediaRelayEx(_:connection:)) __deprecated_msg("use startOrUpdateChannelMediaRelayEx instead.");
883 
898 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
899 
911 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
912 
924 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
925 
942 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
943 
974 - (int)enableEncryptionEx:(bool)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
975 
987 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
988 
989 @end
990 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineKit.h:632
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:252
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:2846
AgoraVideoFrame
Definition: AgoraObjects.h:1664
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:2729
AgoraContentInspectConfig
Definition: AgoraObjects.h:2804
WatermarkOptions
Definition: AgoraObjects.h:1297
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:2001
AgoraDataStreamConfig
Definition: AgoraObjects.h:2182
AgoraUserInfo
Definition: AgoraObjects.h:2125
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:825
AgoraEncryptionConfig
Definition: AgoraObjects.h:2106
AgoraEncodedVideoFrameInfo
Definition: AgoraObjects.h:2889
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2211
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:19
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:807
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1785
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:2814
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2656
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:468
AgoraChannelStats
Definition: AgoraObjects.h:949