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 
298 - (int)enableDualStreamModeEx:(BOOL)enabled
299  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
300  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:));
301 
313 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
314  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
315  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
316 
317 
338 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
339  type:(AgoraVideoStreamType)streamType
340  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
352 - (int)setRemoteVideoSubscriptionOptionsEx:(NSUInteger)uid
353  options:(AgoraVideoSubscriptionOptions* _Nonnull)options
354  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoSubscriptionOptionsEx(_:options:connection:));
355 
370 - (int)pushExternalEncodedVideoFrameEx:(NSData* _Nonnull)frame
371  info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
372  videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrameEx(_:info:videoTrackId:));
373 
392 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
393 
404 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
405  connection:(AgoraRtcConnection * _Nonnull)connection
406  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
407 
420 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
421  connection:(AgoraRtcConnection * _Nonnull)connection
422  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
423 
431 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
432 
433 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
434 
454 - (int)enableLoopbackRecordingEx:(BOOL)enabled
455  deviceName:(NSString* _Nullable)deviceName
456  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
457 #endif
458 
481 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
482  volume:(NSInteger)volume
483  connection:(AgoraRtcConnection* _Nonnull)connection;
484 
485 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
486  category:(NSString * _Nullable)category
487  event:(NSString * _Nullable)event
488  label:(NSString * _Nullable)label
489  value:(NSInteger)value
490  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
491 
492 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
493  smooth:(NSInteger)smooth
494  reportVad:(BOOL)reportVad
495  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
496 
521 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
522  pan:(double)pan
523  gain:(double)gain
524  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
525 
542 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
543  params:(AgoraSpatialAudioParams* _Nonnull)params
544  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
545 
572 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:));
573 
580 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
581 
606 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
607  reliable:(BOOL)reliable
608  ordered:(BOOL)ordered
609  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
620 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
621  config:(AgoraDataStreamConfig * _Nonnull)config
622  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
623 
648 - (int)sendStreamMessageEx:(NSInteger)streamId
649  data:(NSData * _Nonnull)data
650  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
651 
670 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
671 
687 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
688 
702 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
703 
719 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
720 
721 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
722 
731 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
732  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
733 
744 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
745  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
746  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
747 
758 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
759  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
760 
768 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
769  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
770 
779 - (int)startChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startChannelMediaRelayEx(_:connection:));
780 
788 - (int)updateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelMediaRelayEx(_:connection:));
789 
800 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
801 
809 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
810 
818 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
819 
836 - (int)startMediaRenderingTracingEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startMediaRenderingTracingEx(_:));
837 
838 @end
839 
840 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineKit.h:642
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:236
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:2677
AgoraVideoFrame
Definition: AgoraObjects.h:1576
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:2564
WatermarkOptions
Definition: AgoraObjects.h:1213
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:1899
AgoraDataStreamConfig
Definition: AgoraObjects.h:2069
AgoraUserInfo
Definition: AgoraObjects.h:2017
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:815
AgoraEncodedVideoFrameInfo
Definition: AgoraObjects.h:2697
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2098
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:19
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:797
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1715
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:2645
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2504
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:441
AgoraChannelStats
Definition: AgoraObjects.h:887