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:));
126 - (int)muteLocalAudioStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalAudioStreamEx(_:connection:));
140 - (int)muteLocalVideoStreamEx:(BOOL)mute connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteLocalVideoStreamEx(_:connection:));
141 
152 - (int)leaveChannelEx:(AgoraRtcConnection * _Nonnull)connection
153  options:(AgoraLeaveChannelOptions * _Nonnull)options
154  leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats* _Nonnull stat))leaveChannelBlock;
155 
168 - (int)muteRemoteAudioStreamEx:(NSUInteger)uid
169  mute:(BOOL)mute
170  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteAudioStreamEx(_:mute:connection:));
171 
185 - (int)muteAllRemoteAudioStreamsEx:(BOOL)mute
186  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteAudioStreamsEx(_:connection:));
187 
205 - (int)setVideoEncoderConfigurationEx:(AgoraVideoEncoderConfiguration* _Nonnull)config
206  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setVideoEncoderConfigurationEx(_:connection:));
207 
218 - (int)setupRemoteVideoEx:(AgoraRtcVideoCanvas* _Nonnull)remote
219  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setupRemoteVideoEx(_:connection:));
220 
232 - (int)setRemoteRenderModeEx:(NSUInteger)uid
233  mode:(AgoraVideoRenderMode)mode
234  mirror:(AgoraVideoMirrorMode)mirror
235  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteRenderModeEx(_:mode:mirror:connection:));
236 
253 - (int)muteRemoteVideoStreamEx:(NSUInteger)uid
254  mute:(BOOL)mute
255  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteRemoteVideoStreamEx(_:mute:connection:));
256 
270 - (int)muteAllRemoteVideoStreamsEx:(BOOL)mute
271  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(muteAllRemoteVideoStreamsEx(_:connection:));
272 
286 - (int)enableDualStreamModeEx:(BOOL)enabled
287  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
288  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableDualStreamModeEx(_:streamConfig:connection:));
289 
301 - (int)setDualStreamModeEx:(AgoraSimulcastStreamMode)mode
302  streamConfig:(AgoraSimulcastStreamConfig*)streamConfig
303  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setDualStreamModeEx(_:streamConfig:connection:));
304 
305 
326 - (int)setRemoteVideoStreamEx:(NSUInteger)uid
327  type:(AgoraVideoStreamType)streamType
328  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVideoStreamEx(_:type:connection:));
340 - (int)setRemoteVideo:(NSUInteger)uid SubscriptionOptionsEx:(AgoraVideoSubscriptionOptions* _Nonnull)options
341  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteVideo(_:SubscriptionOptionsEx:connection:));
342 
357 - (int)pushExternalEncodedVideoFrameEx:(NSData* _Nonnull)frame
358  info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
359  videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrameEx(_:info:videoTrackId:));
360 
379 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
380 
391 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccountEx:(NSString* _Nonnull)userAccount
392  connection:(AgoraRtcConnection * _Nonnull)connection
393  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccountEx:connection:withError:));
394 
407 - (AgoraUserInfo* _Nullable)getUserInfoByUidEx:(NSUInteger)uid
408  connection:(AgoraRtcConnection * _Nonnull)connection
409  withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUidEx:connection:withError:));
410 
418 - (AgoraConnectionState)getConnectionStateEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(getConnectionStateEx(_:));
419 
420 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
421 
441 - (int)enableLoopbackRecordingEx:(BOOL)enabled
442  deviceName:(NSString* _Nullable)deviceName
443  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(enableLoopbackRecordingEx(_:deviceName:connection:));
444 #endif
445 
468 - (int)adjustUserPlaybackSignalVolumeEx:(NSUInteger)uid
469  volume:(NSInteger)volume
470  connection:(AgoraRtcConnection* _Nonnull)connection;
471 
472 - (int)sendCustomReportMessageEx:(NSString * _Nullable)messageId
473  category:(NSString * _Nullable)category
474  event:(NSString * _Nullable)event
475  label:(NSString * _Nullable)label
476  value:(NSInteger)value
477  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendCustomReportMessageEx(_:category:event:label:value:connection:));
478 
479 - (int)enableAudioVolumeIndicationEx:(NSInteger)interval
480  smooth:(NSInteger)smooth
481  reportVad:(BOOL)reportVad
482  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(enableAudioVolumeIndicationEx(_:smooth:reportVad:connection:));
483 
508 - (int)setRemoteVoicePositionEx:(NSUInteger)uid
509  pan:(double)pan
510  gain:(double)gain
511  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setRemoteVoicePositionEx(_:pan:gain:connection:));
512 
529 - (int)setRemoteUserSpatialAudioParamsEx:(NSUInteger)uid
530  params:(AgoraSpatialAudioParams* _Nonnull)params
531  connection:(AgoraRtcConnection* _Nonnull)connection NS_SWIFT_NAME(setRemoteUserSpatialAudioParamsEx(_:params:connection:));
532 
559 - (int)addVideoWatermarkEx:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(addVideoWatermarkEx(_:options:connection:));
560 
567 - (int)clearVideoWatermarkEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(clearVideoWatermarkEx(_:));
568 
593 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
594  reliable:(BOOL)reliable
595  ordered:(BOOL)ordered
596  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:reliable:ordered:connection:));
607 - (int)createDataStreamEx:(NSInteger * _Nonnull)streamId
608  config:(AgoraDataStreamConfig * _Nonnull)config
609  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(createDataStreamEx(_:config:connection:));
610 
635 - (int)sendStreamMessageEx:(NSInteger)streamId
636  data:(NSData * _Nonnull)data
637  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(sendStreamMessageEx(_:data:connection:));
638 
657 - (int)setSubscribeAudioBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioBlocklistEx(_:connection:));
658 
674 - (int)setSubscribeAudioAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeAudioAllowlistEx(_:connection:));
675 
689 - (int)setSubscribeVideoBlocklistEx:(NSArray <NSNumber *> *_Nonnull)blocklist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoBlocklistEx(_:connection:));
690 
706 - (int)setSubscribeVideoAllowlistEx:(NSArray <NSNumber *> *_Nonnull)allowlist connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(setSubscribeVideoAllowlistEx(_:connection:));
707 
708 - (NSInteger)takeSnapshotEx:(AgoraRtcConnection * _Nonnull)connection uid:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshotEx(_:uid:filePath:));
709 
718 - (int)startRtmpStreamWithoutTranscodingEx:(NSString* _Nonnull)url
719  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithoutTranscodingEx(_:connection:));
720 
731 - (int)startRtmpStreamWithTranscodingEx:(NSString* _Nonnull)url
732  transcoding:(AgoraLiveTranscoding* _Nullable)transcoding
733  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startRtmpStreamWithTranscodingEx(_:transcoding:connection:));
734 
745 - (int)updateRtmpTranscodingEx:(AgoraLiveTranscoding* _Nullable)transcoding
746  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateRtmpTranscodingEx(_:connection:));
747 
755 - (int)stopRtmpStreamEx:(NSString* _Nonnull)url
756  connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopRtmpStreamEx(_:connection:));
757 
766 - (int)startChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(startChannelMediaRelayEx(_:connection:));
767 
775 - (int)updateChannelMediaRelayEx:(AgoraChannelMediaRelayConfiguration * _Nonnull)config connection:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(updateChannelMediaRelayEx(_:connection:));
776 
787 - (int)stopChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(stopChannelMediaRelayEx(_:));
788 
796 - (int)pauseAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(pauseAllChannelMediaRelayEx(_:));
797 
805 - (int)resumeAllChannelMediaRelayEx:(AgoraRtcConnection * _Nonnull)connection NS_SWIFT_NAME(resumeAllChannelMediaRelayEx(_:));
806 
807 @end
808 
809 NS_ASSUME_NONNULL_END
AgoraRtcEngineDelegate-p
Definition: AgoraRtcEngineKit.h:642
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:236
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:2679
AgoraVideoFrame
Definition: AgoraObjects.h:1579
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:2566
WatermarkOptions
Definition: AgoraObjects.h:1216
AgoraRtcEngineKit.h
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:1902
AgoraDataStreamConfig
Definition: AgoraObjects.h:2072
AgoraUserInfo
Definition: AgoraObjects.h:2020
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:815
AgoraEncodedVideoFrameInfo
Definition: AgoraObjects.h:2699
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2101
AgoraRtcEngineKit(Ex)
Definition: AgoraRtcEngineKitEx.h:19
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:797
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1715
AgoraObjects.h
AgoraRtcConnection
Definition: AgoraObjects.h:2647
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:2500
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:441
AgoraChannelStats
Definition: AgoraObjects.h:891