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
19 @interface AgoraRtcEngineKit(Ex)
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
233 - (int)setRemoteRenderRotationEx:(NSUInteger)uid
234 rotation:(AgoraVideoRotation)rotation
235 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderRotationEx(_:rotation:connection:));
236
247 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
248 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
249
261 - (int)setRemoteRenderModeEx:(NSUInteger)uid
262 mode:(AgoraVideoRenderMode)mode
263 mirror:(AgoraVideoMirrorMode)mirror
264 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
265
282 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
283 mute:(BOOL)mute
284 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
285
299 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
300 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
301
317 - (int)enableDualStreamModeEx:(BOOL)enabled
318 streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
319 connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:)) __deprecated_msg("use setDualStreamModeEx: instead.");
320
332 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
333 streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
334 connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
335
336
357 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
358 type:(AgoraVideoStreamType)streamType
359 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
371 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
372 options:(AgoraVideoSubscriptionOptions* _Nonnull)options
373 connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
374
389 - (int)pushExternalEncodedVideoFrameEx:(NSData* _Nonnull)frame
390 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
391 videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrameEx(_:info:videoTrackId:));
392
411 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
412
423 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
424 connection:(AgoraRtcConnection * _Nonnull)connection
425 withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
426
439 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
440 connection:(AgoraRtcConnection * _Nonnull)connection
441 withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
442
450 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
451
452 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
453
473 - (int)enableLoopbackRecordingEx:(BOOL)enabled
474 deviceName:(NSString* _Nullable)deviceName
475 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
476 #endif
477
492 - (int)adjustRecordingSignalVolumeEx:(NSInteger)volume
493 connection:(AgoraRtcConnection* _Nonnull)connection;
494
508 - (int)muteRecordingSignalEx:(BOOL)mute
509 connection:(AgoraRtcConnection* _Nonnull)connection;
510
533 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
534 volume:(NSInteger)volume
535 connection:(AgoraRtcConnection* _Nonnull)connection;
536
537 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
538 category:(NSString * _Nullable)category
539 event:(NSString * _Nullable)event
540 label:(NSString * _Nullable)label
541 value:(NSInteger)value
542 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
543
544 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
545 smooth:(NSInteger)smooth
546 reportVad:(BOOL)reportVad
547 connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
548
573 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
574 pan:(double)pan
575 gain:(double)gain
576 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
577
594 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
595 params:(AgoraSpatialAudioParams* _Nonnull)params
596 connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
597
624 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:));
625
632 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
633
658 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
659 reliable:(BOOL)reliable
660 ordered:(BOOL)ordered
661 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
672 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
673 config:(AgoraDataStreamConfig * _Nonnull)config
674 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
675
700 - (int)sendStreamMessageEx:(NSInteger)streamId
701 data:(NSData * _Nonnull)data
702 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
703
721 - (int)setHighPriorityUserListEx:(NSArray <NSNumber *> *_Nullable)uidList
722 option:(AgoraStreamFallbackOptions)option
723 connection:(AgoraRtcConnection* _Nonnull)connection;
724
743 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
744
760 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
761
775 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
776
792 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
793
794 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
795
807 - (int)enableContentInspectEx:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableContentInspectEx(_:config:connection:));
808
817 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
818 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
819
830 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
831 transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
832 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
833
844 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
845 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
846
854 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
855 connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
856
870 - (int)startOrUpdateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startOrUpdateChannelMediaRelayEx(_:connection:));
871
885 - (int)startChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startChannelMediaRelayEx(_:connection:)) __deprecated_msg("use startOrUpdateChannelMediaRelayEx instead.");
886
899 - (int)updateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelMediaRelayEx(_:connection:)) __deprecated_msg("use startOrUpdateChannelMediaRelayEx instead.");
900
915 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
916
928 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
929
941 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
942
959 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
960
991 - (int)enableEncryptionEx:(bool)enabled encryptionConfig:(AgoraEncryptionConfig *_Nonnull)config connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableEncryptionEx(_:encryptionConfig:connection:));
992
999 - (void)addDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addDelegateEx(_:connection:));
1000
1007 - (void)removeDelegateEx:(id<AgoraRtcEngineDelegate> _Nonnull)delegate connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(removeDelegateEx(_:connection:));
1008
1020 - (NSString * _Nullable)getCallIdEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getCallIdEx(_:));
1021
1022 @end
1023 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineKit.h:649
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:297
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:2929
AgoraVideoFrame
Definition: AgoraObjects.h:1734
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:2812
AgoraContentInspectConfig
Definition: AgoraObjects.h:2887
WatermarkOptions
Definition: AgoraObjects.h:1367
AgoraRtcEngineKit.h
AgoraVideoRotation
AgoraVideoRotation
Definition: AgoraEnumerates.h:865
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:2084
AgoraDataStreamConfig
Definition: AgoraObjects.h:2265
AgoraUserInfo
Definition: AgoraObjects.h:2208
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:825
AgoraEncryptionConfig
Definition: AgoraObjects.h:2189
AgoraEncodedVideoFrameInfo
Definition: AgoraObjects.h:2972
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2294
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:19
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:807
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1808
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:2897
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2705
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:533
AgoraChannelStats
Definition: AgoraObjects.h:1019