Agora RTC Objective-C API Reference Refactor

AgoraRtcEngineKit.h
Go to the documentation of this file.
1 //
2 // AgoraRtcEngineKit.h
3 // AgoraRtcEngineKit
4 //
5 // Copyright (c) 2018 Agora. All rights reserved.
6 //
7
8 #import <Foundation/Foundation.h>
9 #import "AgoraConstants.h"
10 #import "AgoraObjects.h"
11 #import "AgoraRtcMediaPlayerProtocol.h"
12 #import "AgoraH265TranscoderProtocol.h"
13 #import "AgoraRtcEngineDelegate.h"
14 #import "AgoraAudioFrameDelegate.h"
15 #import "AgoraAudioEncodedFrameDelegate.h"
16 #import "AgoraRtcAudioSpectrumDelegate.h"
17 #import "AgoraVideoFrameDelegate.h"
18 #import "AgoraFaceInfoDelegate.h"
19 #import "AgoraEncodedVideoFrameDelegate.h"
20 #import "AgoraRtcMediaPlayerDelegate.h"
21 #import "AgoraMediaRecorderDelegate.h"
22 #import "AgoraMediaMetadataDelegate.h"
23 #import "AgoraMediaMetadataDataSource.h"
24 #import "AgoraDirectCdnStreamingEventDelegate.h"
25 #import "AgoraRtcMediaPlayerCacheManagerProtocol.h"
26 #import "AgoraMediaRecorder.h"
27 #import "AgoraVideoEffectObject.h"
28
34 #pragma mark - AgoraRtcEngineKit
35
47 __attribute__((visibility("default"))) @interface AgoraRtcEngineKit : NSObject
48
49 #pragma mark Core Methods
50
61 @property(nonatomic, weak) id<AgoraRtcEngineDelegate> _Nullable delegate;
62
77 + (instancetype _Nonnull)sharedEngineWithAppId:(NSString * _Nonnull)appId
78 delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate NS_SWIFT_NAME(sharedEngine(withAppId:delegate:));
79
100 + (instancetype _Nonnull)sharedEngineWithConfig:(AgoraRtcEngineConfig * _Nonnull)config
101 delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate NS_SWIFT_NAME(sharedEngine(with:delegate:));
102
140 - (int)preloadChannelByToken:(NSString * _Nullable)token
141 channelId:(NSString * _Nonnull)channelId
142 uid:(NSUInteger)uid NS_SWIFT_NAME(preloadChannel(byToken:channelId:uid:));
143
183 - (int)preloadChannelByTokenWithUserAccount:(NSString * _Nullable)token
184 channelId:(NSString * _Nonnull)channelId
185 userAccount:(NSString * _Nonnull)userAccount NS_SWIFT_NAME(preloadChannelWithUserAccount(byToken:channelId:userAccount:));
186
204 - (int)updatePreloadChannelToken:(NSString * _Nonnull)token NS_SWIFT_NAME(updatePreloadChannelToken(_:));
205
268 - (int)joinChannelByToken:(NSString * _Nullable)token
269 channelId:(NSString * _Nonnull)channelId
270 info:(NSString * _Nullable)info
271 uid:(NSUInteger)uid
272 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:info:uid:joinSuccess:));
273
334 - (int)joinChannelByToken:(NSString * _Nullable)token
335 channelId:(NSString * _Nonnull)channelId
336 uid:(NSUInteger)uid
337 mediaOptions:(AgoraRtcChannelMediaOptions * _Nonnull)mediaOptions
338 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:uid:mediaOptions:joinSuccess:));
339
365 - (int)leaveChannel:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannel(_:));
366
393 - (int)leaveChannel:(AgoraLeaveChannelOptions * _Nonnull)options
394 leaveChannelBlock:(void (^ _Nullable)(AgoraChannelStats * _Nonnull))leaveChannelBlock NS_SWIFT_NAME(leaveChannel(_:leaveChannelBlock:));
395
413 - (int)setChannelProfile:(AgoraChannelProfile)profile NS_SWIFT_NAME(setChannelProfile(_:));
414
423 - (int)updateChannelWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions NS_SWIFT_NAME(updateChannel(with:));
424
440 - (int)setClientRole:(AgoraClientRole)role NS_SWIFT_NAME(setClientRole(_:));
441
469 - (int)setClientRole:(AgoraClientRole)role options:(AgoraClientRoleOptions * _Nullable)options NS_SWIFT_NAME(setClientRole(_:options:));
470
487 - (int)renewToken:(NSString * _Nonnull)token NS_SWIFT_NAME(renewToken(_:));
488
494 - (AgoraConnectionState)getConnectionState NS_SWIFT_NAME(getConnectionState());
495
520 - (int)startOrUpdateChannelMediaRelay:(AgoraChannelMediaRelayConfiguration * _Nonnull)config NS_SWIFT_NAME(startOrUpdateChannelMediaRelay(_:));
521
537 - (int)stopChannelMediaRelay NS_SWIFT_NAME(stopChannelMediaRelay());
538
548 - (int)pauseAllChannelMediaRelay NS_SWIFT_NAME(pauseAllChannelMediaRelay());
549
559 - (int)resumeAllChannelMediaRelay NS_SWIFT_NAME(resumeAllChannelMediaRelay());
560
575 - (int)enableWirelessAccelerate:(BOOL)enabled NS_SWIFT_NAME(enableWirelessAccelerate(_:));
576
577 - (int)startLocalVideoTranscoder:(AgoraLocalTranscoderConfiguration* _Nonnull)config NS_SWIFT_NAME(startLocalVideoTranscoder(_:));
578
579 - (int)updateLocalTranscoderConfiguration:(AgoraLocalTranscoderConfiguration* _Nonnull)config NS_SWIFT_NAME(updateLocalTranscoderConfiguration(_:));
580
581 - (int)stopLocalVideoTranscoder NS_SWIFT_NAME(stopLocalVideoTranscoder());
582
592 - (int)startLocalAudioMixer:(AgoraLocalAudioMixerConfiguration* _Nonnull)config NS_SWIFT_NAME(startLocalAudioMixer(_:));
593
603 - (int)updateLocalAudioMixerConfiguration:(AgoraLocalAudioMixerConfiguration* _Nonnull)config NS_SWIFT_NAME(updateLocalAudioMixerConfiguration(_:));
604
619 - (int)stopLocalAudioMixer NS_SWIFT_NAME(stopLocalAudioMixer());
620
635 - (int)startMediaRenderingTracing NS_SWIFT_NAME(startMediaRenderingTracing());
636
650 - (int)enableInstantMediaRendering NS_SWIFT_NAME(enableInstantMediaRendering());
651
671 + (void)destroy NS_SWIFT_NAME(destroy());
672
697 + (void)destroy:(void (^ _Nullable)(void))engineReleasedBlock NS_SWIFT_NAME(destroy(_:));
698
699 #pragma mark Core Audio
700
714 - (int)enableAudio NS_SWIFT_NAME(enableAudio());
715
727 - (int)disableAudio NS_SWIFT_NAME(disableAudio());
728
751 - (int)enableLocalAudio:(BOOL)enabled NS_SWIFT_NAME(enableLocalAudio(_:));
752
768 - (int)setAudioProfile:(AgoraAudioProfile)profile NS_SWIFT_NAME(setAudioProfile(_:));
769
770 - (int)setAudioScenario:(AgoraAudioScenario)scenario NS_SWIFT_NAME(setAudioScenario(_:));
771
793 - (int)enableAudioVolumeIndication:(NSInteger)interval
794 smooth:(NSInteger)smooth
795 reportVad:(BOOL)reportVad NS_SWIFT_NAME(enableAudioVolumeIndication(_:smooth:reportVad:));
796
797
798 #if TARGET_OS_IPHONE
799
816 - (int)setEnableSpeakerphone:(BOOL)enableSpeaker NS_SWIFT_NAME(setEnableSpeakerphone(_:));
817
827 - (BOOL)isSpeakerphoneEnabled NS_SWIFT_NAME(isSpeakerphoneEnabled());
828
856 - (int)setDefaultAudioRouteToSpeakerphone:(BOOL)defaultToSpeaker NS_SWIFT_NAME(setDefaultAudioRouteToSpeakerphone(_:));
857 #endif
858
870 - (int)adjustRecordingSignalVolume:(NSInteger)volume NS_SWIFT_NAME(adjustRecordingSignalVolume(_:));
871
883 - (int)adjustPlaybackSignalVolume:(NSInteger)volume NS_SWIFT_NAME(adjustPlaybackSignalVolume(_:));
884
904 - (int)adjustUserPlaybackSignalVolume:(NSUInteger)uid volume:(int)volume NS_SWIFT_NAME(adjustUserPlaybackSignalVolume(_:volume:));
905
914 - (int)muteRecordingSignal:(BOOL)muted NS_SWIFT_NAME(muteRecordingSignal(_:));
915
926 - (int)muteLocalAudioStream:(BOOL)mute NS_SWIFT_NAME(muteLocalAudioStream(_:));
927
941 - (int)muteRemoteAudioStream:(NSUInteger)uid mute:(BOOL)mute NS_SWIFT_NAME(muteRemoteAudioStream(_:mute:));
942
968 - (int)muteAllRemoteAudioStreams:(BOOL)mute NS_SWIFT_NAME(muteAllRemoteAudioStreams(_:));
969
980 - (int)startRecordingDeviceTest:(int)indicationInterval NS_SWIFT_NAME(startRecordingDeviceTest(_:));
981
991 - (int)stopRecordingDeviceTest NS_SWIFT_NAME(stopRecordingDeviceTest());
992
1007 - (int)startPlaybackDeviceTest:(NSString * _Nonnull)audioFileName NS_SWIFT_NAME(startPlaybackDeviceTest(_:));
1008
1018 - (int)stopPlaybackDeviceTest NS_SWIFT_NAME(stopPlaybackDeviceTest());
1019
1032 - (int)registerExtensionWithVendor:(NSString * _Nonnull)provider
1033 extension:(NSString * _Nonnull)extension
1034 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(registerExtension(withVendor:extension:sourceType:));
1035
1055 - (int)enableExtensionWithVendor:(NSString * _Nonnull)provider extension:(NSString * _Nonnull)extension enabled:(BOOL)enabled NS_SWIFT_NAME(enableExtension(withVendor:extension:enabled:));
1056
1077 - (int)enableExtensionWithVendor:(NSString * _Nonnull)provider
1078 extension:(NSString * _Nonnull)extension
1079 enabled:(BOOL)enabled
1080 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(enableExtension(withVendor:extension:enabled:sourceType:));
1081
1102 - (int)enableExtensionWithVendor:(NSString * _Nonnull)provider
1103 extension:(NSString * _Nonnull)extension
1104 extensionInfo:(AgoraExtensionInfo * _Nonnull)extensionInfo
1105 enabled:(BOOL)enabled NS_SWIFT_NAME(enableExtension(withVendor:extension:extensionInfo:enabled:));
1106
1118 - (int)setExtensionProviderPropertyWithVendor:(NSString * _Nonnull)provider
1119 key:(NSString * _Nonnull)key
1120 value:(NSString * _Nonnull)value NS_SWIFT_NAME(setExtensionProviderPropertyWithVendor(_:key:value:));
1121
1132 - (int)setExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1133 extension:(NSString * _Nonnull)extension
1134 key:(NSString * _Nonnull)key
1135 value:(NSString * _Nonnull)value NS_SWIFT_NAME(setExtensionPropertyWithVendor(_:extension:key:value:));
1136
1150 - (int)setExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1151 extension:(NSString * _Nonnull)extension
1152 key:(NSString * _Nonnull)key
1153 value:(NSString * _Nonnull)value
1154 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setExtensionPropertyWithVendor(_:extension:key:value:sourceType:));
1155
1169 - (int)setExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1170 extension:(NSString * _Nonnull)extension
1171 extensionInfo:(AgoraExtensionInfo * _Nonnull)extensionInfo
1172 key:(NSString * _Nonnull)key
1173 value:(NSString * _Nonnull)value NS_SWIFT_NAME(setExtensionPropertyWithVendor(_:extension:extensionInfo:key:value:));
1174
1185 - (NSString * _Nullable)getExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1186 extension:(NSString * _Nonnull)extension
1187 key:(NSString * _Nonnull)key NS_SWIFT_NAME(getExtensionProperty(withVendor:extension:key:));
1188
1200 - (NSString * _Nullable)getExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1201 extension:(NSString * _Nonnull)extension
1202 key:(NSString * _Nonnull)key
1203 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(getExtensionProperty(withVendor:extension:key:sourceType:));
1204
1216 - (NSString * _Nullable)getExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1217 extension:(NSString * _Nonnull)extension
1218 extensionInfo:(AgoraExtensionInfo * _Nonnull)extensionInfo
1219 key:(NSString * _Nonnull)key NS_SWIFT_NAME(getExtensionProperty(withVendor:extension:extensionInfo:key:));
1220
1221 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
1222
1242 - (int)enableLoopbackRecording:(BOOL)enabled deviceName:(NSString* _Nullable)deviceName NS_SWIFT_NAME(enableLoopbackRecording(_:deviceName:));
1243
1256 - (int)adjustLoopbackSignalVolume:(NSInteger)volume NS_SWIFT_NAME(adjustLoopbackSignalVolume(_:));
1257
1264 - (int)getLoopbackRecordingVolume NS_SWIFT_NAME(getLoopbackRecordingVolume());
1265 #endif
1266
1267 #pragma mark Core Video
1268
1289 - (int)enableVideo NS_SWIFT_NAME(enableVideo());
1290
1300 - (int)disableVideo NS_SWIFT_NAME(disableVideo());
1301
1327 - (int)enableLocalVideo:(BOOL)enabled NS_SWIFT_NAME(enableLocalVideo(_:));
1328
1334 - (NSArray <AgoraVideoCodecCapInfo *> *_Nullable)queryCodecCapability;
1335
1345 - (int)queryDeviceScore NS_SWIFT_NAME(queryDeviceScore());
1346
1353 - (AgoraHDRCapability)queryHDRCapability:(AgoraVideoModule)videoModule NS_SWIFT_NAME(queryHDRCapability(_:));
1354
1371 - (int)setVideoEncoderConfiguration:(AgoraVideoEncoderConfiguration * _Nonnull)config NS_SWIFT_NAME(setVideoEncoderConfiguration(_:));
1372
1392 - (int)setupLocalVideo:(AgoraRtcVideoCanvas * _Nullable)local NS_SWIFT_NAME(setupLocalVideo(_:));
1393
1404 - (int)setLocalRenderTargetFps:(AgoraVideoSourceType)sourceType
1405 targetFps:(int)targetFps;
1414 - (int)setRemoteRenderTargetFps:(int)targetFps;
1415
1434 - (int)setLocalRenderMode:(AgoraVideoRenderMode)mode
1435 mirror:(AgoraVideoMirrorMode)mirror NS_SWIFT_NAME(setLocalRenderMode(_:mirror:));
1436
1448 - (int)startPreview NS_SWIFT_NAME(startPreview());
1449
1463 - (int)startPreview: (AgoraVideoSourceType)sourceType NS_SWIFT_NAME(startPreview(_:));
1464
1472 - (int)stopPreview NS_SWIFT_NAME(stopPreview());
1473
1481 - (int)stopPreview: (AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopPreview(_:));
1482
1493 - (int)setupRemoteVideo:(AgoraRtcVideoCanvas * _Nonnull)remote NS_SWIFT_NAME(setupRemoteVideo(_:));
1494
1504 - (int)setRemoteRenderMode:(NSUInteger)uid
1505 mode:(AgoraVideoRenderMode)mode
1506 mirror:(AgoraVideoMirrorMode)mirror NS_SWIFT_NAME(setRemoteRenderMode(_:mode:mirror:));
1507
1520 - (int)muteLocalVideoStream:(BOOL)mute NS_SWIFT_NAME(muteLocalVideoStream(_:));
1521
1537 - (int)muteRemoteVideoStream:(NSUInteger)uid
1538 mute:(BOOL)mute NS_SWIFT_NAME(muteRemoteVideoStream(_:mute:));
1539
1565 - (int)muteAllRemoteVideoStreams:(BOOL)mute NS_SWIFT_NAME(muteAllRemoteVideoStreams(_:));
1566
1580 - (int)setBeautyEffectOptions:(BOOL)enable options:(AgoraBeautyOptions* _Nullable)options NS_SWIFT_NAME(setBeautyEffectOptions(_:options:));
1581
1596 - (int)setBeautyEffectOptions:(BOOL)enable options:(AgoraBeautyOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setBeautyEffectOptions(_:options:sourceType:));
1597
1611 - (int)setFaceShapeBeautyOptions:(BOOL)enable options:(AgoraFaceShapeBeautyOptions* _Nullable)options NS_SWIFT_NAME(setFaceShapeBeautyOptions(_:options:));
1612
1627 - (int)setFaceShapeBeautyOptions:(BOOL)enable options:(AgoraFaceShapeBeautyOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setFaceShapeBeautyOptions(_:options:sourceType:));
1628
1636 - (AgoraFaceShapeBeautyOptions * _Nullable)getFaceShapeBeautyOptions NS_SWIFT_NAME(getFaceShapeBeautyOptions());
1637
1647 - (AgoraFaceShapeBeautyOptions * _Nullable)getFaceShapeBeautyOptions:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(getFaceShapeBeautyOptions(_:));
1648
1658 - (int)setFaceShapeAreaOptions:(AgoraFaceShapeAreaOptions* _Nullable)options NS_SWIFT_NAME(setFaceShapeAreaOptions(_:));
1659
1670 - (int)setFaceShapeAreaOptions:(AgoraFaceShapeAreaOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setFaceShapeAreaOptions(_:sourceType:));
1671
1681 - (AgoraFaceShapeAreaOptions * _Nullable)getFaceShapeAreaOptions:(AgoraFaceShapeArea) area NS_SWIFT_NAME(getFaceShapeAreaOptions(_:));
1682
1693 - (AgoraFaceShapeAreaOptions * _Nullable)getFaceShapeAreaOptions:(AgoraFaceShapeArea) area sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(getFaceShapeAreaOptions(_:sourceType:));
1694
1719 - (int)setVideoDenoiserOptions:(BOOL)enable options:(AgoraVideoDenoiserOptions* _Nullable)options NS_SWIFT_NAME(setVideoDenoiserOptions(_:options:));
1720
1746 - (int)setVideoDenoiserOptions:(BOOL)enable options:(AgoraVideoDenoiserOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setVideoDenoiserOptions(_:options:sourceType:));
1747
1748
1772 - (int)setFilterEffectOptions:(BOOL)enable options:(AgoraFilterEffectOptions* _Nullable)options NS_SWIFT_NAME(setFilterEffectOptions(_:options:));
1773
1798 - (int)setFilterEffectOptions:(BOOL)enable options:(AgoraFilterEffectOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setFilterEffectOptions(_:options:sourceType:));
1799
1800 #pragma mark VideoEffectObject
1801
1813 - (id<AgoraVideoEffectObject> _Nullable)createVideoEffectObjectWithBundlePath:(NSString * _Nonnull)bundlePath
1814 sourceType:(AgoraMediaSourceType)sourceType
1815 NS_SWIFT_NAME(createVideoEffectObject(bundlePath:sourceType:));
1816
1828 - (int)destroyVideoEffectObject:(id<AgoraVideoEffectObject> _Nullable)videoEffectObject
1829 NS_SWIFT_NAME(destroyVideoEffectObject(_:));
1830
1831
1856 - (int)setLowlightEnhanceOptions:(BOOL)enable options:(AgoraLowlightEnhanceOptions* _Nullable)options NS_SWIFT_NAME(setLowlightEnhanceOptions(_:options:));
1857
1883 - (int)setLowlightEnhanceOptions:(BOOL)enable options:(AgoraLowlightEnhanceOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setLowlightEnhanceOptions(_:options:sourceType:));
1884
1909 - (int)setColorEnhanceOptions:(BOOL)enable options:(AgoraColorEnhanceOptions* _Nullable)options NS_SWIFT_NAME(setColorEnhanceOptions(_:options:));
1910
1936 - (int)setColorEnhanceOptions:(BOOL)enable options:(AgoraColorEnhanceOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setColorEnhanceOptions(_:options:sourceType:));
1937
1985 - (int)enableVirtualBackground:(BOOL)enable backData:(AgoraVirtualBackgroundSource* _Nullable)backData segData:(AgoraSegmentationProperty* _Nullable)segData NS_SWIFT_NAME(enableVirtualBackground(_:backData:segData:));
1986
2035 - (int)enableVirtualBackground:(BOOL)enable backData:(AgoraVirtualBackgroundSource* _Nullable)backData segData:(AgoraSegmentationProperty* _Nullable)segData sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(enableVirtualBackground(_:backData:segData:sourceType:));
2036
2048 - (int)setVideoScenario:(AgoraApplicationScenarioType)scenarioType NS_SWIFT_NAME(setVideoScenario(_:));
2049
2061 - (int)setVideoQoEPreference:(AgoraQoEPreferenceType)preferenceType NS_SWIFT_NAME(setVideoQoEPreference(_:));
2062
2071 - (BOOL)isFeatureAvailableOnDevice:(AgoraFeatureType)type;
2072
2073 #pragma mark Audio Effect
2074
2088 - (int)setLocalVoicePitch:(double)pitch NS_SWIFT_NAME(setLocalVoicePitch(_:));
2089
2099 - (int)setLocalVoiceFormant:(double)formantRatio;
2100
2108 - (int)setLocalVoiceEqualizationOfBandFrequency:(AgoraAudioEqualizationBandFrequency)bandFrequency withGain:(NSInteger)gain NS_SWIFT_NAME(setLocalVoiceEqualizationOf(_:withGain:));
2109
2117 - (int)setLocalVoiceReverbOfType:(AgoraAudioReverbType)reverbType withValue:(NSInteger)value NS_SWIFT_NAME(setLocalVoiceReverbOf(_:withValue:));
2118
2119 #pragma mark Audio Effect Playback
2120
2149 - (int)preloadEffect:(int)soundId
2150 filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffect(_:filePath:));
2151
2180 - (int)preloadEffect:(int)soundId
2181 filePath:(NSString* _Nonnull)filePath
2182 startPos:(int)startPos NS_SWIFT_NAME(preloadEffect(_:filePath:startPos:));
2183
2207 - (int)playEffect:(int)soundId
2208 filePath:(NSString* _Nonnull)filePath
2209 loopCount:(NSInteger)loopCount
2210 pitch:(double)pitch
2211 pan:(double)pan
2212 gain:(NSInteger)gain NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:));
2213
2243 - (int)playEffect:(int)soundId
2244 filePath:(NSString* _Nonnull)filePath
2245 loopCount:(NSInteger)loopCount
2246 pitch:(double)pitch
2247 pan:(double)pan
2248 gain:(NSInteger)gain
2249 startPos:(int)startPos NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:startPos:));
2250
2282 - (int)playEffect:(int)soundId
2283 filePath:(NSString* _Nonnull)filePath
2284 loopCount:(NSInteger)loopCount
2285 pitch:(double)pitch
2286 pan:(double)pan
2287 gain:(NSInteger)gain
2288 publish:(BOOL)publish NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:publish:));
2289
2322 - (int)playEffect:(int)soundId
2323 filePath:(NSString* _Nonnull)filePath
2324 loopCount:(NSInteger)loopCount
2325 pitch:(double)pitch
2326 pan:(double)pan
2327 gain:(NSInteger)gain
2328 publish:(BOOL)publish
2329 startPos:(int)startPos NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:publish:startPos:));
2330
2361 - (int)playAllEffectsWithLoopCount:(NSInteger)loopCount
2362 pitch:(double)pitch
2363 pan:(double)pan
2364 gain:(NSInteger)gain
2365 publish:(BOOL)publish NS_SWIFT_NAME(playAllEffects(withLoopCount:pitch:pan:gain:publish:));
2366
2374 - (int)getEffectsVolume NS_SWIFT_NAME(getEffectsVolume());
2375
2385 - (int)setEffectsVolume:(NSInteger)volume NS_SWIFT_NAME(setEffectsVolume(_:));
2386
2397 - (int)setVolumeOfEffect:(int)soundId
2398 withVolume:(int)volume NS_SWIFT_NAME(setVolumeOfEffect(_:withVolume:));
2399
2409 - (int)getVolumeOfEffect:(int)soundId NS_SWIFT_NAME(getVolumeOfEffect(_:));
2410
2418 - (int)pauseEffect:(int)soundId NS_SWIFT_NAME(pauseEffect(_:));
2419
2425 - (int)pauseAllEffects NS_SWIFT_NAME(pauseAllEffects());
2426
2434 - (int)resumeEffect:(int)soundId NS_SWIFT_NAME(resumeEffect(_:));
2435
2441 - (int)resumeAllEffects NS_SWIFT_NAME(resumeAllEffects());
2442
2450 - (int)stopEffect:(int)soundId NS_SWIFT_NAME(stopEffect(_:));
2451
2458 - (int)stopAllEffects NS_SWIFT_NAME(stopAllEffects());
2459
2475 - (int)getEffectDuration:(NSString* _Nonnull)filePath NS_SWIFT_NAME(getEffectDuration(_:));
2476
2491 - (int)setEffectPosition:(int)soundId pos:(NSInteger)pos NS_SWIFT_NAME(setEffectPosition(_:pos:));
2492
2503 - (int)getEffectCurrentPosition:(int)soundId NS_SWIFT_NAME(getEffectCurrentPosition(_:));
2504
2512 - (int)unloadEffect:(int)soundId NS_SWIFT_NAME(unloadEffect(_:));
2513
2520 - (int)unloadAllEffects NS_SWIFT_NAME(unloadAllEffects());
2521
2522 #pragma mark beautifier effect
2523
2560 - (int)setVoiceBeautifierPreset:(AgoraVoiceBeautifierPreset)preset NS_SWIFT_NAME(setVoiceBeautifierPreset(_:));
2561
2599 - (int)setAudioEffectPreset:(AgoraAudioEffectPreset)preset NS_SWIFT_NAME(setAudioEffectPreset(_:));
2600
2639 - (int)setVoiceConversionPreset:(AgoraVoiceConversionPreset)preset NS_SWIFT_NAME(setVoiceConversionPreset(_:));
2640
2716 - (int)setAudioEffectParameters:(AgoraAudioEffectPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setAudioEffectParameters(_:param1:param2:));
2717
2760 - (int)setVoiceBeautifierParameters:(AgoraVoiceBeautifierPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setVoiceBeautifierParameters(_:param1:param2:));
2761
2774 - (int)setVoiceConversionParameters:(AgoraVoiceConversionPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setVoiceConversionParameters(_:param1:param2:));
2775
2787 - (int)setHeadphoneEQPreset:(AgoraHeadphoneEQPreset)preset NS_SWIFT_NAME(setHeadphoneEQPreset(_:));
2788
2798 - (int)setHeadphoneEQParameters:(int)lowGain highGain:(int)highGain NS_SWIFT_NAME(setHeadphoneEQParameters(_:highGain:));
2799
2811 - (int)enableVoiceAITuner:(BOOL)enabled type:(AgoraVoiceAITunerType)type NS_SWIFT_NAME(enableVoiceAITuner(_:type:));
2812
2813 #pragma mark Sound Position Indication
2814
2832 - (int)enableSoundPositionIndication:(BOOL)enabled NS_SWIFT_NAME(enableSoundPositionIndication(_:));
2833
2857 - (int)setRemoteVoicePosition:(NSUInteger)uid pan:(double)pan gain:(double)gain NS_SWIFT_NAME(setRemoteVoicePosition(_:pan:gain:));
2858
2869 - (int)enableSpatialAudio:(BOOL)enabled NS_SWIFT_NAME(enableSpatialAudio(_:));
2870
2886 - (int)setRemoteUserSpatialAudioParams:(NSUInteger)uid
2887 params:(AgoraSpatialAudioParams* _Nonnull)params NS_SWIFT_NAME(setRemoteUserSpatialAudioParams(_:params:));
2888
2889 #pragma mark Audio Noise Suppression
2890
2900 - (int)setAINSMode:(BOOL)enabled mode:(AUDIO_AINS_MODE)mode NS_SWIFT_NAME(setAINSMode(_:mode:));
2901
2902 #pragma mark Audio Mixing
2903
2940 - (int)startAudioMixing:(NSString * _Nonnull)filePath
2941 loopback:(BOOL)loopback
2942 cycle:(NSInteger)cycle NS_SWIFT_NAME(startAudioMixing(_:loopback:cycle:));
2943
2976 - (int)startAudioMixing:(NSString * _Nonnull)filePath
2977 loopback:(BOOL)loopback
2978 cycle:(NSInteger)cycle
2979 startPos:(NSInteger)startPos NS_SWIFT_NAME(startAudioMixing(_:loopback:cycle:startPos:));
2980
2990 - (int)stopAudioMixing NS_SWIFT_NAME(stopAudioMixing());
2991
3000 - (int)pauseAudioMixing NS_SWIFT_NAME(pauseAudioMixing());
3001
3011 - (int)resumeAudioMixing NS_SWIFT_NAME(resumeAudioMixing());
3012
3021 - (int)selectAudioTrack:(NSInteger)index NS_SWIFT_NAME(selectAudioTrack(_:));
3022
3031 - (int)getAudioTrackCount NS_SWIFT_NAME(getAudioTrackCount());
3032
3043 - (int)adjustAudioMixingVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingVolume(_:));
3044
3053 - (int)adjustAudioMixingPublishVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingPublishVolume(_:));
3054
3063 - (int)getAudioMixingPublishVolume NS_SWIFT_NAME(getAudioMixingPublishVolume());
3064
3073 - (int)adjustAudioMixingPlayoutVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingPlayoutVolume(_:));
3074
3083 - (int)getAudioMixingPlayoutVolume NS_SWIFT_NAME(getAudioMixingPlayoutVolume());
3084
3094 - (int)getAudioMixingDuration NS_SWIFT_NAME(getAudioMixingDuration());
3095
3104 - (int)getAudioMixingCurrentPosition NS_SWIFT_NAME(getAudioMixingCurrentPosition());
3105
3116 - (int)setAudioMixingPosition:(NSInteger)pos NS_SWIFT_NAME(setAudioMixingPosition(_:));
3117
3128 - (int)setAudioMixingDualMonoMode:(AgoraAudioMixingDualMonoMode)mode NS_SWIFT_NAME(setAudioMixingDualMonoMode(_:));
3129
3139 - (int)setAudioMixingPitch:(NSInteger)pitch NS_SWIFT_NAME(setAudioMixingPitch(_:));
3140
3159 - (int)setAudioMixingPlaybackSpeed:(NSInteger)speed NS_SWIFT_NAME(setAudioMixingPlaybackSpeed(_:));
3160
3161 #pragma mark Audio Recording
3162
3183 - (int)startAudioRecording:(NSString * _Nonnull)filePath
3184 quality:(AgoraAudioRecordingQuality)quality NS_SWIFT_NAME(startAudioRecording(_:quality:));
3185
3209 - (int)startAudioRecordingWithConfig:(AgoraAudioRecordingConfiguration * _Nonnull)config NS_SWIFT_NAME(startAudioRecording(withConfig:));
3210
3211 - (int)setAudioEncodedFrameDelegate:(id<AgoraAudioEncodedFrameDelegate> _Nullable)delegate config:(AgoraAudioEncodedFrameDelegateConfig * _Nonnull)config NS_SWIFT_NAME(setAudioEncodedFrameDelegate(_:config:));
3212
3220 - (int)stopAudioRecording NS_SWIFT_NAME(stopAudioRecording());
3221
3222 #pragma mark Echo Test
3223
3240 - (int)startEchoTestWithConfig:(AgoraEchoTestConfiguration* _Nonnull)config NS_SWIFT_NAME(startEchoTest(withConfig:));
3241
3249 - (int)stopEchoTest NS_SWIFT_NAME(stopEchoTest());
3250
3251
3252 #pragma mark Miscellaneous Audio Control
3253
3268 - (int)enableInEarMonitoring:(BOOL)enabled NS_SWIFT_NAME(enable(inEarMonitoring:));
3269
3281 - (int)enableInEarMonitoring:(BOOL)enabled includeAudioFilters:(AgoraEarMonitoringFilterType)includeAudioFilters NS_SWIFT_NAME(enable(inEarMonitoring:includeAudioFilters:));
3282
3294 - (int)setInEarMonitoringVolume:(NSInteger)volume NS_SWIFT_NAME(setInEarMonitoringVolume(_:));
3295
3296 #if TARGET_OS_IPHONE
3297
3305 - (void)setAudioSessionOperationRestriction:(AgoraAudioSessionOperationRestriction)restriction NS_SWIFT_NAME(setAudioSessionOperationRestriction(_:));
3306 #endif
3307
3308 #pragma mark Dual Video Mode
3309
3326 - (int)enableDualStreamMode:(BOOL)enabled NS_SWIFT_NAME(enableDualStreamMode(_:)) __deprecated_msg("use setDualStreamMode: instead.");
3327
3346 - (int)enableDualStreamMode:(BOOL)enabled
3347 streamConfig:(AgoraSimulcastStreamConfig* _Nonnull)streamConfig NS_SWIFT_NAME(enableDualStreamMode(_:streamConfig:)) __deprecated_msg("use setDualStreamMode: instead.");
3348
3358 - (int)setDualStreamMode:(AgoraSimulcastStreamMode)mode NS_SWIFT_NAME(setDualStreamMode(_:));
3359
3376 - (int)setDualStreamMode:(AgoraSimulcastStreamMode)mode
3377 streamConfig:(AgoraSimulcastStreamConfig* _Nonnull)streamConfig NS_SWIFT_NAME(setDualStreamMode(_:streamConfig:));
3378
3393 - (int)setSimulcastConfig:(AgoraSimulcastConfig* _Nonnull)simulcastConfig NS_SWIFT_NAME(setSimulcastConfig(_:));
3394
3405 - (int)setRemoteDefaultVideoStreamType:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteDefaultVideoStreamType(_:));
3406
3426 - (int)setRemoteVideoStream:(NSUInteger)uid
3427 type:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteVideoStream(_:type:));
3428
3439 - (int)setRemoteVideoSubscriptionOptions:(NSUInteger)uid
3440 options:(AgoraVideoSubscriptionOptions* _Nonnull)options NS_SWIFT_NAME(setRemoteVideoSubscriptionOptions(_:options:));
3441
3442 #pragma mark Subscribe Blocklist / Allowlist
3443
3457 - (int)setSubscribeAudioBlocklist:(NSArray <NSNumber *> *_Nonnull)blocklist NS_SWIFT_NAME(setSubscribeAudioBlocklist(_:));
3458
3474 - (int)setSubscribeAudioAllowlist:(NSArray <NSNumber *> *_Nonnull)allowlist NS_SWIFT_NAME(setSubscribeAudioAllowlist(_:));
3475
3489 - (int)setSubscribeVideoBlocklist:(NSArray <NSNumber *> *_Nonnull)blocklist NS_SWIFT_NAME(setSubscribeVideoBlocklist(_:));
3490
3506 - (int)setSubscribeVideoAllowlist:(NSArray <NSNumber *> *_Nonnull)allowlist NS_SWIFT_NAME(setSubscribeVideoAllowlist(_:));
3507
3508 #pragma mark Stream Fallback
3509
3532 - (int)setLocalPublishFallbackOption:(AgoraStreamFallbackOptions)option NS_SWIFT_NAME(setLocalPublishFallbackOption(_:));
3533
3545 - (int)setRemoteSubscribeFallbackOption:(AgoraStreamFallbackOptions)option NS_SWIFT_NAME(setRemoteSubscribeFallbackOption(_:));
3546
3558 - (int)setHighPriorityUserList:(NSArray <NSNumber *> *_Nullable)uidList
3559 option:(AgoraStreamFallbackOptions)option;
3560
3561
3562 #pragma mark External Media Source
3563
3588 - (void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture sourceType:(AgoraExternalVideoSourceType)sourceType NS_SWIFT_NAME(setExternalVideoSource(_:useTexture:sourceType:));
3589
3609 - (void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture
3610 sourceType:(AgoraExternalVideoSourceType)sourceType
3611 encodedVideoTrackOption:(AgoraEncodedVideoTrackOptions* _Nonnull)encodedVideoTrackOption NS_SWIFT_NAME(setExternalVideoSource(_:useTexture:sourceType:encodedVideoTrackOption:));
3612
3630 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame NS_SWIFT_NAME(pushExternalVideoFrame(_:)) __deprecated_msg("use pushExternalVideoFrame:frame,videoTrackId options instead.");
3631
3650 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
3651
3666 - (int)pushExternalEncodedVideoFrame:(NSData* _Nonnull)frame
3667 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info NS_SWIFT_NAME(pushExternalEncodedVideoFrame(_:info:));
3668
3684 - (int)pushExternalEncodedVideoFrame:(NSData* _Nonnull)frame
3685 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
3686 videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrame(_:info:videoTrackId:));
3687
3688
3696 - (unsigned int)createCustomVideoTrack NS_SWIFT_NAME(createCustomVideoTrack());
3697
3705 - (unsigned int)createCustomEncodedVideoTrack:(AgoraEncodedVideoTrackOptions* _Nonnull)encodedVideoTrackOption NS_SWIFT_NAME(createCustomEncodedVideoTrack(_:));
3706
3715 - (int)destroyCustomVideoTrack:(NSUInteger)videoTrackId NS_SWIFT_NAME(destroyCustomVideoTrack(_:));
3716
3725 - (int)destroyCustomEncodedVideoTrack:(NSUInteger)videoTrackId NS_SWIFT_NAME(destroyCustomEncodedVideoTrack(_:));
3726
3727 #pragma mark External Audio Data
3728
3742 - (void)enableExternalAudioSink:(BOOL)enabled
3743 sampleRate:(NSUInteger)sampleRate
3744 channels:(NSUInteger)channels NS_SWIFT_NAME(enableExternalAudioSink(_:sampleRate:channels:));
3745
3762 - (BOOL)pullPlaybackAudioFrameRawData:(void * _Nonnull)data
3763 lengthInByte:(NSUInteger)lengthInByte NS_SWIFT_NAME(pullPlaybackAudioFrameRawData(_:lengthInByte:));
3764
3783 - (CMSampleBufferRef _Nullable)pullPlaybackAudioFrameSampleBufferByLengthInByte:(NSUInteger)lengthInByte NS_SWIFT_NAME(pullPlaybackAudioFrameSampleBufferBy(lengthInByte:));
3784
3800 - (int)createCustomAudioTrack:(AgoraAudioTrackType)trackType
3801 config:(AgoraAudioTrackConfig* _Nonnull)config;
3802
3812 - (int)destroyCustomAudioTrack:(NSInteger)trackId;
3813
3828 - (int)enableCustomAudioLocalPlayback:(NSInteger)trackId enabled:(BOOL)enabled NS_SWIFT_NAME(enableCustomAudioLocalPlayback(_:enabled:));
3829
3841 - (int)pushExternalAudioFrameRawData:(void * _Nonnull)data
3842 samples:(NSInteger)samples
3843 trackId:(NSInteger)trackId
3844 timestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(pushExternalAudioFrameRawData(_:samples:trackId:timestamp:)) __deprecated_msg("use pushExternalAudioFrameRawData:samples:sampleRate:channels:trackId:timestamp: instead.");
3845
3859 - (int)pushExternalAudioFrameRawData:(void* _Nonnull)data
3860 samples:(NSInteger)samples
3861 sampleRate:(NSInteger)sampleRate
3862 channels:(NSInteger)channels
3863 trackId:(NSInteger)trackId
3864 timestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(pushExternalAudioFrameRawData(_:samples:sampleRate:channels:trackId:timestamp:));
3865
3876 - (int)pushExternalAudioFrameSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer NS_SWIFT_NAME(pushExternalAudioFrameSampleBuffer(_:)) __deprecated_msg("use pushExternalAudioFrameSampleBuffer:sampleRate:channels:trackId: instead.");
3877
3891 - (int)pushExternalAudioFrameSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer
3892 sampleRate:(NSInteger)sampleRate
3893 channels:(NSInteger)channels
3894 trackId:(NSInteger)trackId NS_SWIFT_NAME(pushExternalAudioFrameSampleBuffer(_:sampleRate:channels:trackId:));
3895
3919 - (int)setRecordingAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
3920 channel:(NSInteger)channel
3921 mode:(AgoraAudioRawFrameOperationMode)mode
3922 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setRecordingAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
3923
3948 - (int)setPlaybackAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
3949 channel:(NSInteger)channel
3950 mode:(AgoraAudioRawFrameOperationMode)mode
3951 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setPlaybackAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
3952
3970 - (int)setMixedAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
3971 channel:(NSInteger)channel
3972 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setMixedAudioFrameParametersWithSampleRate(_:channel:samplesPerCall:));
3973
3998 - (int)setEarMonitoringAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
3999 channel:(NSInteger)channel
4000 mode:(AgoraAudioRawFrameOperationMode)mode
4001 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setEarMonitoringAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
4002
4016 - (int)setPlaybackAudioFrameBeforeMixingParametersWithSampleRate:(NSInteger)sampleRate
4017 channel:(NSInteger)channel NS_SWIFT_NAME(setPlaybackAudioFrameBeforeMixingParametersWithSampleRate(_:channel:));
4018
4019 /*
4020 * Adjust the custom audio publish volume by track id.
4021 * @param trackId custom audio track id.
4022 * @param volume The volume, range is [0,100]:
4023 * 0: mute, 100: The original volume
4024 * @return
4025 * - 0: Success.
4026 * - < 0: Failure.
4027 */
4028 - (int)adjustCustomAudioPublishVolume:(NSInteger)trackId volume:(NSInteger)volume NS_SWIFT_NAME(adjustCustomAudioPublishVolume(_:volume:));
4029
4030 /*
4031 * Adjust the custom audio playout volume by track id.
4032 * @param trackId custom audio track id.
4033 * @param volume The volume, range is [0,100]:
4034 * 0: mute, 100: The original volume
4035 * @return
4036 * - 0: Success.
4037 * - < 0: Failure.
4038 */
4039 - (int)adjustCustomAudioPlayoutVolume:(NSInteger)trackId volume:(NSInteger)volume NS_SWIFT_NAME(adjustCustomAudioPlayoutVolume(_:volume:));
4040
4041 /*
4042 * Get monotonic time in ms which can be used by capture time,
4043 * typical scenario is as follows:
4044 *
4045 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4046 * | // custom audio/video base capture time, e.g. the first audio/video capture time. |
4047 * | int64_t custom_capture_time_base; |
4048 * | |
4049 * | int64_t agora_monotonic_time = getAgoraCurrentMonotonicTimeInMs(); |
4050 * | |
4051 * | // offset is fixed once calculated in the begining. |
4052 * | const int64_t offset = agora_monotonic_time - custom_capture_time_base; |
4053 * | |
4054 * | // realtime_custom_audio/video_capture_time is the origin capture time that customer provided.|
4055 * | // actual_audio/video_capture_time is the actual capture time transfered to sdk. |
4056 * | int64_t actual_audio_capture_time = realtime_custom_audio_capture_time + offset; |
4057 * | int64_t actual_video_capture_time = realtime_custom_video_capture_time + offset; |
4058 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4059 *
4060 * @return
4061 * - >= 0: Success.
4062 * - < 0: Failure.
4063 */
4064 - (int64_t)getCurrentMonotonicTimeInMs NS_SWIFT_NAME(getCurrentMonotonicTimeInMs());
4065
4066 #pragma mark Audio spectrum monitor
4067
4080 - (int)registerAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable )delegate NS_SWIFT_NAME(registerAudioSpectrumDelegate(_:));
4081
4090 - (int)unregisterAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable)delegate NS_SWIFT_NAME(unregisterAudioSpectrumDelegate(_:));
4091
4102 - (int)enableAudioSpectrumMonitor:(int)intervalInMS NS_SWIFT_NAME(enableAudioSpectrumMonitor(_:));
4103
4111 - (int)disableAudioSpectrumMonitor NS_SWIFT_NAME(disableAudioSpectrumMonitor());
4112
4113 #pragma mark Built-in Encryption
4114
4144 - (int)enableEncryption:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig * _Nonnull)config NS_SWIFT_NAME(enableEncryption(_:encryptionConfig:));
4145
4146 #pragma mark Data Stream
4147
4171 - (int)createDataStream:(NSInteger * _Nonnull)streamId
4172 reliable:(BOOL)reliable
4173 ordered:(BOOL)ordered NS_SWIFT_NAME(createDataStream(_:reliable:ordered:));
4174
4184 - (int)createDataStream:(NSInteger * _Nonnull)streamId
4185 config:(AgoraDataStreamConfig * _Nonnull)config NS_SWIFT_NAME(createDataStream(_:config:));
4186
4210 - (int)sendStreamMessage:(NSInteger)streamId
4211 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendStreamMessage(_:data:));
4212
4213 #pragma mark Stream Publish
4214
4232 - (int)startRtmpStreamWithoutTranscoding:(NSString* _Nonnull)url NS_SWIFT_NAME(startRtmpStreamWithoutTranscoding(_:));
4233
4246 - (int)startRtmpStreamWithTranscoding:(NSString* _Nonnull)url transcoding:(AgoraLiveTranscoding* _Nullable)transcoding NS_SWIFT_NAME(startRtmpStream(withTranscoding:transcoding:));
4247
4264 - (int)updateRtmpTranscoding:(AgoraLiveTranscoding* _Nullable)transcoding NS_SWIFT_NAME(updateRtmpTranscoding(_:));
4265
4283 - (int)stopRtmpStream:(NSString* _Nonnull)url NS_SWIFT_NAME(stopRtmpStream(_:));
4284
4285 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
4286 #pragma mark Screen Capture
4287
4301 - (int)startScreenCapture:(AgoraVideoSourceType)sourceType config:(AgoraScreenCaptureConfiguration * _Nullable)config NS_SWIFT_NAME(startScreenCapture(_:config:));
4302
4312 - (int)stopScreenCapture:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopScreenCapture(_:));
4313
4333 - (int)startScreenCaptureByDisplayId:(UInt32)displayId
4334 regionRect:(CGRect)regionRect
4335 captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams NS_SWIFT_NAME(startScreenCapture(byDisplayId:regionRect:captureParams:));
4336
4356 - (int)startScreenCaptureByWindowId:(UInt32)windowId
4357 regionRect:(CGRect)regionRect
4358 captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams NS_SWIFT_NAME(startScreenCapture(byWindowId:regionRect:captureParams:));
4359
4369 - (int)updateScreenCaptureRegion:(CGRect)rect NS_SWIFT_NAME(updateScreenCaptureRegion(_:));
4370
4380 - (int)updateScreenCaptureParameters:(AgoraScreenCaptureParameters * _Nonnull)captureParams NS_SWIFT_NAME(updateScreenCaptureParameters(_:));
4381
4412 - (NSArray<AgoraScreenCaptureSourceInfo*>* _Nullable)getScreenCaptureSourcesWithThumbSize:(NSSize)thumbSize iconSize:(NSSize)iconSize includeScreen:(BOOL)includeScreen NS_SWIFT_NAME(getScreenCaptureSources(withThumbSize:iconSize:includeScreen:));
4413
4414 #endif
4415
4425 - (int)setScreenCaptureScenario:(AgoraScreenScenarioType)scenarioType NS_SWIFT_NAME(setScreenCaptureScenario(_:));
4426
4434 - (int)stopScreenCapture NS_SWIFT_NAME(stopScreenCapture());
4435
4436 #if TARGET_OS_IPHONE
4437
4456 - (int)startScreenCapture:(AgoraScreenCaptureParameters2* _Nullable)parameters NS_SWIFT_NAME(startScreenCapture(_:));
4457
4467 - (int)updateScreenCapture:(AgoraScreenCaptureParameters2* _Nullable)parameters NS_SWIFT_NAME(updateScreenCapture(_:));
4468
4480 - (AgoraScreenCaptureFrameRateCapability)queryScreenCaptureCapability NS_SWIFT_NAME(queryScreenCaptureCapability());
4481
4482 - (NSArray<AgoraFocalLengthInfo *>* _Nullable)queryCameraFocalLengthCapability NS_SWIFT_NAME(queryCameraFocalLengthCapability());
4483
4484 #pragma mark Camera Control
4485
4497 - (BOOL)isCameraZoomSupported NS_SWIFT_NAME(isCameraZoomSupported());
4498
4505 - (CGFloat)cameraMaxZoomFactor NS_SWIFT_NAME(cameraMaxZoomFactor());
4506
4513 - (CGFloat)setCameraZoomFactor:(CGFloat)zoomFactor NS_SWIFT_NAME(setCameraZoomFactor(_:));
4514
4522 - (BOOL)isCameraFocusPositionInPreviewSupported NS_SWIFT_NAME(isCameraFocusPositionInPreviewSupported());
4523
4531 - (BOOL)setCameraFocusPositionInPreview:(CGPoint)position NS_SWIFT_NAME(setCameraFocusPositionInPreview(_:));
4532
4540 - (BOOL)isCameraExposurePositionSupported NS_SWIFT_NAME(isCameraExposurePositionSupported());
4541
4549 - (BOOL)setCameraExposurePosition:(CGPoint)positionInView NS_SWIFT_NAME(setCameraExposurePosition(_:));
4550
4559 - (BOOL)isCameraExposureSupported NS_SWIFT_NAME(isCameraExposureSupported());
4560
4568 - (CGFloat)setCameraExposureFactor:(CGFloat)exposureFactor NS_SWIFT_NAME(setCameraExposureFactor(_:));
4569
4590 - (BOOL)isCameraTorchSupported NS_SWIFT_NAME(isCameraTorchSupported());
4591
4608 - (BOOL)setCameraTorchOn:(BOOL)isOn NS_SWIFT_NAME(setCameraTorchOn(_:));
4609
4617 - (BOOL)isCameraAutoFocusFaceModeSupported NS_SWIFT_NAME(isCameraAutoFocusFaceModeSupported());
4618
4630 - (BOOL)setCameraAutoFocusFaceModeEnabled:(BOOL)enable NS_SWIFT_NAME(setCameraAutoFocusFaceModeEnabled(_:));
4631
4639 - (BOOL)isCameraAutoExposureFaceModeSupported NS_SWIFT_NAME(isCameraAutoExposureFaceModeSupported());
4640
4652 - (BOOL)setCameraAutoExposureFaceModeEnabled:(BOOL)enable NS_SWIFT_NAME(setCameraAutoExposureFaceModeEnabled(_:));
4653
4662 - (int)switchCamera NS_SWIFT_NAME(switchCamera());
4663
4673 - (int)enableMultiCamera:(BOOL)enabled config:(AgoraCameraCapturerConfiguration* _Nullable)config NS_SWIFT_NAME(enableMultiCamera(_:config:));
4674
4683 - (int) setCameraStabilizationMode:(AgoraCameraStabilizationMode)mode NS_SWIFT_NAME(setCameraStabilizationMode(_:));
4684 #endif
4685
4690 - (BOOL)isCameraCenterStageSupported NS_SWIFT_NAME(isCameraCenterStageSupported());
4691
4700 - (int)enableCameraCenterStage:(BOOL)enabled NS_SWIFT_NAME(enableCameraCenterStage(_:));
4701
4713 - (int)setCameraCapturerConfiguration:(AgoraCameraCapturerConfiguration * _Nullable)config NS_SWIFT_NAME(setCameraCapturerConfiguration(_:));
4714
4723 - (int)startCameraCapture:(AgoraVideoSourceType)sourceType config:(AgoraCameraCapturerConfiguration * _Nullable)config NS_SWIFT_NAME(startCameraCapture(_:config:));
4724
4733 - (int)stopCameraCapture:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopCameraCapture(_:));
4734
4735 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
4736 #pragma mark macOS Device
4737
4750 - (void)monitorDeviceChange:(BOOL)enabled NS_SWIFT_NAME(monitorDeviceChange(_:));
4751
4764 - (NSArray<AgoraRtcDeviceInfo *> * _Nullable)enumerateDevices:(AgoraMediaDeviceType)type NS_SWIFT_NAME(enumerateDevices(_:));
4765
4773 - (AgoraRtcDeviceInfo * _Nullable)getDeviceInfo:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceInfo(_:));
4774
4784 - (int)setDevice:(AgoraMediaDeviceType)type deviceId:(NSString * _Nonnull)deviceId NS_SWIFT_NAME(setDevice(_:deviceId:));
4785
4792 - (AgoraRtcDeviceInfo* _Nullable)getDefaultAudioDevice:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDefaultAudioDevice(_:));
4793
4802 - (int)getDeviceVolume:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceVolume(_:));
4803
4813 - (int)setDeviceVolume:(AgoraMediaDeviceType)type volume:(int)volume NS_SWIFT_NAME(setDeviceVolume(_:volume:));
4814
4828 - (int)startAudioDeviceLoopbackTest:(int)indicationInterval NS_SWIFT_NAME(startAudioDeviceLoopbackTest(_:));
4829
4837 - (int)stopAudioDeviceLoopbackTest NS_SWIFT_NAME(stopAudioDeviceLoopbackTest());
4838
4850 - (int)followSystemPlaybackDevice:(BOOL)enable NS_SWIFT_NAME(followSystemPlaybackDevice(_:));
4851
4863 - (int)followSystemRecordingDevice:(BOOL)enable NS_SWIFT_NAME(followSystemRecordingDevice(_:));
4864
4873 - (int)startCaptureDeviceTest:(NSView * _Nonnull)view NS_SWIFT_NAME(startCaptureDeviceTest(_:));
4874
4881 - (int)stopCaptureDeviceTest NS_SWIFT_NAME(stopCaptureDeviceTest());
4882 #endif
4883
4884 #pragma mark Face Detection
4885
4886 #if TARGET_OS_IPHONE
4887
4910 - (int)enableFaceDetection:(BOOL)enable NS_SWIFT_NAME(enableFaceDetection(_:));
4911 #endif
4912
4913 #pragma mark Watermark
4914
4926 - (int)addVideoWatermark:(AgoraImage * _Nonnull)watermark NS_SWIFT_NAME(addVideoWatermark(_:)) __deprecated_msg("use addVideoWatermark:url options instead.");
4927
4953 - (int)addVideoWatermark:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options NS_SWIFT_NAME(addVideoWatermark(_:options:));
4954
4959 - (int)clearVideoWatermarks NS_SWIFT_NAME(clearVideoWatermarks());
4960
4961 #pragma mark String UID
4962
4994 - (int)registerLocalUserAccount:(NSString* _Nonnull)userAccount appId:(NSString* _Nonnull)appId NS_SWIFT_NAME(registerLocalUserAccount(_:appId:));
4995
5030 - (int)joinChannelByToken:(NSString * _Nullable)token
5031 channelId:(NSString * _Nonnull)channelId
5032 userAccount:(NSString * _Nonnull)userAccount
5033 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:userAccount:joinSuccess:));
5034
5070 - (int)joinChannelByToken:(NSString * _Nullable)token
5071 channelId:(NSString * _Nonnull)channelId
5072 userAccount:(NSString * _Nonnull)userAccount
5073 mediaOptions:(AgoraRtcChannelMediaOptions * _Nonnull)mediaOptions
5074 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:userAccount:mediaOptions:joinSuccess:));
5075
5086 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccount:(NSString* _Nonnull)userAccount withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccount:withError:));
5087
5098 - (AgoraUserInfo* _Nullable)getUserInfoByUid:(NSUInteger)uid withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUid:withError:));
5099
5100 #pragma mark Custom Audio PCM Frame
5101
5107 - (BOOL)setAudioFrameDelegate:(id<AgoraAudioFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setAudioFrameDelegate(_:));
5108
5109 #pragma mark Custom Video Frame
5110
5121 - (BOOL)setVideoFrameDelegate:(id<AgoraVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setVideoFrameDelegate(_:));
5122
5123 #pragma mark Encoded Video Frame
5124
5135 - (BOOL)setEncodedVideoFrameDelegate:(id<AgoraEncodedVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setEncodedVideoFrameDelegate(_:));
5136
5137 #pragma mark Custom Face Info
5138
5145 - (BOOL)setFaceInfoDelegate:(id<AgoraFaceInfoDelegate> _Nullable)delegate NS_SWIFT_NAME(setFaceInfoDelegate(_:));
5146
5147 #pragma mark Custom Media Metadata
5148
5170 - (BOOL)setMediaMetadataDataSource:(id<AgoraMediaMetadataDataSource> _Nullable)metadataDataSource withType:(AgoraMetadataType)type NS_SWIFT_NAME(setMediaMetadataDataSource(_:with:));
5171
5187 - (BOOL)setMediaMetadataDelegate:(id<AgoraMediaMetadataDelegate> _Nullable)metadataDelegate withType:(AgoraMetadataType)type NS_SWIFT_NAME(setMediaMetadataDelegate(_:with:));
5188
5189 #pragma mark Miscellaneous Methods
5190
5200 + (NSString * _Nonnull)getSdkVersion NS_SWIFT_NAME(getSdkVersion());
5201
5207 + (NSString* _Nonnull)getErrorDescription:(NSInteger)error NS_SWIFT_NAME(getErrorDescription(_:));
5208
5213 - (void * _Nullable)getNativeHandle NS_SWIFT_NAME(getNativeHandle());
5214
5238 - (int)setLogFile:(NSString * _Nonnull)filePath NS_SWIFT_NAME(setLogFile(_:));
5239
5254 - (int)setLogFilter:(NSUInteger)filter NS_SWIFT_NAME(setLogFilter(_:));
5255
5270 - (int)setLogFileSize:(NSUInteger)fileSizeInKBytes NS_SWIFT_NAME(setLogFileSize(_:));
5271
5279 - (NSString * _Nullable)uploadLogFile NS_SWIFT_NAME(uploadLogFile());
5280
5291 - (int)writeLog:(AgoraLogLevel)level content:(NSString * _Nonnull)content NS_SWIFT_NAME(writeLog(_:content:));
5292
5303 - (NSString * _Nullable)getCallId NS_SWIFT_NAME(getCallId());
5304
5325 - (int)rate:(NSString * _Nonnull)callId
5326 rating:(NSInteger)rating
5327 description:(NSString * _Nullable)description NS_SWIFT_NAME(rate(_:rating:description:));
5328
5346 - (int)complain:(NSString * _Nonnull)callId
5347 description:(NSString * _Nullable)description NS_SWIFT_NAME(complain(_:description:));
5348
5359 - (int)enableMainQueueDispatch:(BOOL)enabled NS_SWIFT_NAME(enableMainQueueDispatch(_:));
5360
5381 - (int)startLastmileProbeTest:(AgoraLastmileProbeConfig *_Nullable)config NS_SWIFT_NAME(startLastmileProbeTest(_:));
5382
5390 - (int)stopLastmileProbeTest NS_SWIFT_NAME(stopLastmileProbeTest());
5391
5398 - (int)setParameters:(NSString * _Nonnull)options NS_SWIFT_NAME(setParameters(_:));
5399
5405 - (NSString * _Nullable)getParameter:(NSString * _Nonnull)parameter
5406 args:(NSString * _Nullable)args NS_SWIFT_NAME(getParameter(_:args:));
5407
5411 - (uint64_t)getNtpWallTimeInMs;
5412
5413 #pragma mark MediaPlayer
5414
5423 - (id<AgoraRtcMediaPlayerProtocol>_Nullable)createMediaPlayerWithDelegate:(id<AgoraRtcMediaPlayerDelegate>_Nullable)delegate NS_SWIFT_NAME(createMediaPlayer(with:));
5424
5429 - (id<AgoraRtcMediaPlayerCacheManagerProtocol> _Nullable)createMediaPlayerCacheManager NS_SWIFT_NAME(createMediaPlayerCacheManager());
5430
5442 - (int)destroyMediaPlayer:(id<AgoraRtcMediaPlayerProtocol>_Nullable)mediaPlayer NS_SWIFT_NAME(destroyMediaPlayer(_:));
5443
5449 - (id<AgoraRtcMediaPlayerProtocol> _Nullable)getMediaPlayer:(int)mediaPlayerId NS_SWIFT_NAME(getMediaPlayer(_:));
5450
5451 #pragma mark rhythm player
5452
5463 - (int)startRhythmPlayer:(NSString * _Nonnull)sound1 sound2:(NSString * _Nonnull)sound2 config:(AgoraRhythmPlayerConfig * _Nullable)config NS_SWIFT_NAME(startRhythmPlayer(_:sound2:config:));
5464
5471 - (int)stopRhythmPlayer NS_SWIFT_NAME(stopRhythmPlayer());
5472
5481 - (int)configRhythmPlayer:(AgoraRhythmPlayerConfig * _Nullable)config NS_SWIFT_NAME(configRhythmPlayer(_:));
5482
5483 #pragma mark Streaming Kit
5484
5496 - (int)setDirectCdnStreamingAudioConfiguration:(AgoraAudioProfile)profile NS_SWIFT_NAME(setDirectCdnStreamingAudioConfiguration(_:));
5497
5512 - (int)setDirectCdnStreamingVideoConfiguration:(AgoraVideoEncoderConfiguration * _Nonnull)config NS_SWIFT_NAME(setDirectCdnStreamingVideoConfiguration(_:));
5513
5527 - (int)startDirectCdnStreaming:(id<AgoraDirectCdnStreamingEventDelegate> _Nonnull)delegate
5528 publishUrl:(NSString * _Nonnull)publishUrl
5529 mediaOptions:(AgoraDirectCdnStreamingMediaOptions * _Nonnull)options NS_SWIFT_NAME(startDirectCdnStreaming(_:publishUrl:mediaOptions:));
5530
5540 - (int)stopDirectCdnStreaming NS_SWIFT_NAME(stopDirectCdnStreaming());
5541
5551 - (int)updateDirectCdnStreamingMediaOptions:(AgoraDirectCdnStreamingMediaOptions * _Nonnull)options NS_SWIFT_NAME(updateDirectCdnStreamingMediaOptions(_:));
5552
5560 - (int)setAdvancedAudioOptions:(AgoraAdvancedAudioOptions * _Nonnull)options NS_SWIFT_NAME(setAdvancedAudioOptions(_:));
5561
5571 - (int)sendCustomReportMessage:(NSString * _Nullable)messageId
5572 category:(NSString * _Nullable)category
5573 event:(NSString * _Nullable)event
5574 label:(NSString * _Nullable)label
5575 value:(NSInteger)value NS_SWIFT_NAME(sendCustomReportMessage(_:category:event:label:value:));
5576
5592 - (int)setLogLevel:(AgoraLogLevel)level NS_SWIFT_NAME(setLogLevel(_:));
5593
5600 - (int)setLocalAccessPoint:(AgoraLocalAccessPointConfiguration* _Nonnull)config NS_SWIFT_NAME(setLocalAccessPoint(withConfig:));
5601
5640 - (int)setCloudProxy:(AgoraCloudProxyType)proxyType NS_SWIFT_NAME(setCloudProxy(_:));
5641
5671 - (NSInteger)takeSnapshot:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshot(_:filePath:));
5672
5697 - (NSInteger)takeSnapshotWithConfig:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotWithConfig(_:config:));
5698
5699 - (int)enableContentInspect:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config NS_SWIFT_NAME(enableContentInspect(_:config:));
5700
5711 - (int)setAVSyncSource:(NSString* _Nonnull)channelId uid:(NSUInteger)uid NS_SWIFT_NAME(setAVSyncSource(_:uid:));
5712
5722 - (int)sendAudioMetadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadata(_:));
5729 - (int)enableVideoImageSource:(BOOL)enable
5730 options:(AgoraImageTrackOptions *_Nullable)options NS_SWIFT_NAME(enableVideoImageSource(_:options:));
5731
5743 - (int)getNetworkType NS_SWIFT_NAME(getNetworkType());
5744
5754 - (AgoraMediaRecorder * _Nullable)createMediaRecorder:(AgoraRecorderStreamInfo * _Nonnull)info NS_SWIFT_NAME(createMediaRecorder(withInfo:));
5755
5765 - (int)destroyMediaRecorder:(AgoraMediaRecorder * _Nullable)mediaRecorder;
5766
5767 #pragma mark Channel Transcoder
5768
5773 - (id<AgoraH265TranscoderProtocol>_Nullable)getH265Transcoder NS_SWIFT_NAME (getH265Transcoder());
5774
5775 #pragma mark Deprecated Methods
5776
5780 - (int)setLocalVideoMirrorMode:(AgoraVideoMirrorMode)mode NS_SWIFT_NAME(setLocalVideoMirrorMode(_:)) __deprecated;
5781
5792 - (int)enableWebSdkInteroperability:(BOOL)enabled NS_SWIFT_NAME(enableWebSdkInteroperability(_:)) __deprecated;
5793
5805 - (void)audioVolumeIndicationBlock:(void(^ _Nullable)(NSArray * _Nonnull speakers, NSInteger totalVolume))audioVolumeIndicationBlock NS_SWIFT_NAME(audioVolumeIndicationBlock(_:)) __deprecated_msg("use delegate instead.");
5806
5815 - (void)firstLocalVideoFrameBlock:(void(^ _Nullable)(NSInteger width, NSInteger height, NSInteger elapsed))firstLocalVideoFrameBlock NS_SWIFT_NAME(firstLocalVideoFrameBlock(_:)) __deprecated_msg("use delegate instead.");
5816
5827 - (void)firstRemoteVideoDecodedBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger width, NSInteger height, NSInteger elapsed))firstRemoteVideoDecodedBlock NS_SWIFT_NAME(firstRemoteVideoDecodedBlock(_:)) __deprecated_msg("use delegate instead.");
5828
5838 - (void)firstRemoteVideoFrameBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger width, NSInteger height, NSInteger elapsed))firstRemoteVideoFrameBlock NS_SWIFT_NAME(firstRemoteVideoFrameBlock(_:)) __deprecated_msg("use delegate instead.");
5839
5849 - (void)userJoinedBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger elapsed))userJoinedBlock NS_SWIFT_NAME(userJoinedBlock(_:)) __deprecated_msg("use delegate instead.");
5850
5859 - (void)userOfflineBlock:(void(^ _Nullable)(NSUInteger uid))userOfflineBlock NS_SWIFT_NAME(userOfflineBlock(_:)) __deprecated_msg("use delegate instead.");
5860
5870 - (void)userMuteAudioBlock:(void(^ _Nullable)(NSUInteger uid, BOOL muted))userMuteAudioBlock NS_SWIFT_NAME(userMuteAudioBlock(_:)) __deprecated_msg("use delegate instead.");
5871
5886 - (void)userMuteVideoBlock:(void(^ _Nullable)(NSUInteger uid, BOOL muted))userMuteVideoBlock NS_SWIFT_NAME(userMuteVideoBlock(_:)) __deprecated_msg("use delegate instead.");
5887
5895 - (void)localVideoStatBlock:(void(^ _Nullable)(NSInteger sentBitrate, NSInteger sentFrameRate))localVideoStatBlock NS_SWIFT_NAME(localVideoStatBlock(_:)) __deprecated_msg("use delegate instead.");
5896
5906 - (void)remoteVideoStatBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger delay, NSInteger receivedBitrate, NSInteger receivedFrameRate))remoteVideoStatBlock NS_SWIFT_NAME(remoteVideoStatBlock(_:)) __deprecated_msg("use delegate instead.");
5907
5911 - (void)cameraReadyBlock:(void(^ _Nullable)(void))cameraReadyBlock NS_SWIFT_NAME(cameraReadyBlock(_:)) __deprecated_msg("use delegate instead.");
5912
5916 - (void)connectionLostBlock:(void(^ _Nullable)(void))connectionLostBlock NS_SWIFT_NAME(connectionLostBlock(_:)) __deprecated_msg("use delegate instead.");
5917
5928 - (void)rejoinChannelSuccessBlock:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))rejoinChannelSuccessBlock NS_SWIFT_NAME(rejoinChannelSuccessBlock(_:)) __deprecated_msg("use delegate instead.");
5929
5936 - (void)rtcStatsBlock:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))rtcStatsBlock NS_SWIFT_NAME(rtcStatsBlock(_:)) __deprecated_msg("use delegate instead.");
5937
5947 - (void)audioQualityBlock:(void(^ _Nullable)(NSUInteger uid, AgoraNetworkQuality quality, NSUInteger delay, NSUInteger lost))audioQualityBlock NS_SWIFT_NAME(audioQualityBlock(_:)) __deprecated_msg("use delegate instead.");
5948
5957 - (void)networkQualityBlock:(void(^ _Nullable)(NSUInteger uid, AgoraNetworkQuality txQuality, AgoraNetworkQuality rxQuality))networkQualityBlock NS_SWIFT_NAME(networkQualityBlock(_:)) __deprecated_msg("use delegate instead.");
5958
5965 - (void)lastmileQualityBlock:(void(^ _Nullable)(AgoraNetworkQuality quality))lastmileQualityBlock NS_SWIFT_NAME(lastmileQualityBlock(_:)) __deprecated_msg("use delegate instead.");
5966
5970 - (void)mediaEngineEventBlock:(void(^ _Nullable)(NSInteger code))mediaEngineEventBlock NS_SWIFT_NAME(mediaEngineEventBlock(_:)) __deprecated_msg("use delegate instead.");
5971
5981 - (int)pauseAudio __deprecated_msg("use disableAudio instead.");
5982
5992 - (int)resumeAudio __deprecated_msg("use enableAudio instead.");
5993
6000 + (instancetype _Nonnull)sharedEngineWithAppId:(NSString * _Nonnull)AppId
6001 error:(void(^ _Nullable)(AgoraErrorCode errorCode))errorBlock NS_SWIFT_NAME(sharedEngine(withAppId:error:)) __deprecated_msg("use sharedEngineWithAppId:delegate: instead.");
6002
6008 - (int)setHighQualityAudioParametersWithFullband:(BOOL)fullband
6009 stereo:(BOOL)stereo
6010 fullBitrate:(BOOL)fullBitrate NS_SWIFT_NAME(setHighQualityAudioParametersWithFullband(_:stereo:fullBitrate:)) __deprecated_msg("use setAudioProfile:scenario: instead.");
6011
6012
6031 - (int)setAudioProfile:(AgoraAudioProfile)profile scenario:(AgoraAudioScenario)scenario NS_SWIFT_NAME(setAudioProfile(_:scenario:)) __deprecated_msg("use setAudioProfile: instead.");
6032
6039 - (NSString * _Nullable)getDeviceId:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceId(_:)) __deprecated_msg("use getDeviceInfo: instead.");
6040
6061 - (int)setExternalAudioSource:(BOOL)enabled
6062 sampleRate:(NSInteger)sampleRate
6063 channels:(NSInteger)channels NS_SWIFT_NAME(setExternalAudioSource(_:sampleRate:channels:)) __deprecated_msg("use createCustomAudioTrack:config: instead.");
6064
6091 - (int)setExternalAudioSource:(BOOL)enabled
6092 sampleRate:(NSInteger)sampleRate
6093 channels:(NSInteger)channels
6094 localPlayback:(BOOL)localPlayback
6095 publish:(BOOL)publish NS_SWIFT_NAME(setExternalAudioSource(_:sampleRate:channels:localPlayback:publish:)) __deprecated_msg("use createCustomAudioTrack:config: instead.");
6096
6097 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
6098
6107 - (int)setSpeakerphoneVolume:(NSUInteger)volume NS_SWIFT_NAME(setSpeakerphoneVolume(_:)) __deprecated_msg("use setDeviceVolume:volume: instead.");
6108
6109 - (int)startScreenCapture:(NSUInteger)windowId
6110 withCaptureFreq:(NSInteger)captureFreq
6111 bitRate:(NSInteger)bitRate
6112 andRect:(CGRect)rect NS_SWIFT_NAME(startScreenCapture(_:withCaptureFreq:bitRate:andRect:)) __deprecated_msg("use startScreenCaptureByWindowId:regionRect:captureParams: instead.");
6113 #endif
6114
6120 + (NSString * _Nonnull)getMediaEngineVersion NS_SWIFT_NAME(getMediaEngineVersion()) __deprecated;
6121
6122
6141 - (int)setVideoResolution:(CGSize)size andFrameRate:(NSInteger)frameRate bitrate:(NSInteger)bitrate NS_SWIFT_NAME(setVideoResolution(_:andFrameRate:bitrate:)) __deprecated_msg("use setVideoEncoderConfiguration: instead.");
6142
6151 - (void)leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelBlock(_:)) __deprecated_msg("use delegate instead.");
6152
6156 - (int)setLocalRenderMode:(NSUInteger)uid
6157 mode:(AgoraVideoRenderMode)mode NS_SWIFT_NAME(setLocalRenderMode(_:mode:)) __deprecated;
6158
6169 - (int)enableExternalAudioSourceLocalPlayback:(BOOL)enable NS_SWIFT_NAME(enableExternalAudioSourceLocalPlayback(_:)) __deprecated;;
6170
6171 - (int)startMultipleVideoStreams:(VIEW_CLASS * _Nonnull)view screen:(VIEW_CLASS * _Nonnull)screenView remotes:(NSArray * _Nullable)remoteViews NS_SWIFT_NAME(startMultipleVideoStreams(_:screen:remotes:)) __deprecated;;
6172
6178 - (void)addDelegate:(id<AgoraRtcEngineDelegate> _Nonnull)delegate NS_SWIFT_NAME(addDelegate(_:));
6179
6185 - (void)removeDelegate:(id<AgoraRtcEngineDelegate> _Nonnull)delegate NS_SWIFT_NAME(removeDelegate(_:));
6186
6187 @end
-[AgoraRtcEngineKit enableAudio]
int enableAudio()
AgoraAudioTrackType
AgoraAudioTrackType
Definition: AgoraEnumerates.h:3779
AgoraRtcEngineKit::delegate
id< AgoraRtcEngineDelegate > _Nullable delegate
Definition: AgoraRtcEngineKit.h:61
AgoraRecorderStreamInfo
Definition: AgoraObjects.h:3226
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:48
AgoraRtcMediaPlayerCacheManagerProtocol.h
-[AgoraRtcEngineKit getNetworkType]
int getNetworkType()
-[AgoraRtcEngineKit queryDeviceScore]
int queryDeviceScore()
-[AgoraRtcEngineKit enableInstantMediaRendering]
int enableInstantMediaRendering()
Enable instant media rendering.
-[AgoraRtcEngineKit cameraMaxZoomFactor]
CGFloat cameraMaxZoomFactor()
-[AgoraRtcEngineKit stopChannelMediaRelay]
int stopChannelMediaRelay()
AgoraMediaMetadataDelegate.h
-[AgoraRtcEngineKit getConnectionState]
AgoraConnectionState getConnectionState()
AgoraEncodedVideoTrackOptions
Definition: AgoraObjects.h:274
AgoraRtcChannelMediaOptions
Definition: AgoraObjects.h:300
AgoraAudioScenario
AgoraAudioScenario
Definition: AgoraEnumerates.h:1307
AgoraEarMonitoringFilterType
AgoraEarMonitoringFilterType
Definition: AgoraEnumerates.h:3403
AgoraRhythmPlayerConfig
Definition: AgoraObjects.h:3357
AgoraBeautyOptions
Definition: AgoraObjects.h:2464
AgoraVideoSubscriptionOptions
Definition: AgoraObjects.h:3205
AgoraMediaRecorder
Definition: AgoraMediaRecorder.h:14
AgoraRtcMediaPlayerProtocol.h
AgoraAudioTrackConfig
Definition: AgoraObjects.h:3617
AgoraClientRole
AgoraClientRole
Definition: AgoraEnumerates.h:531
AgoraScreenCaptureParameters2
Definition: AgoraObjects.h:2993
AgoraHeadphoneEQPreset
AgoraHeadphoneEQPreset
Definition: AgoraEnumerates.h:1749
AgoraVideoModule
AgoraVideoModule
Definition: AgoraEnumerates.h:3895
AgoraVideoFrameDelegate.h
AUDIO_AINS_MODE
AUDIO_AINS_MODE
Definition: AgoraEnumerates.h:3798
-[AgoraRtcEngineKit startMediaRenderingTracing]
int startMediaRenderingTracing()
Start tracing media rendering events.
-[AgoraRtcEngineKit switchCamera]
int switchCamera()
AgoraFeatureType
AgoraFeatureType
Definition: AgoraEnumerates.h:3890
AgoraFaceShapeAreaOptions
Definition: AgoraObjects.h:2506
AgoraCameraStabilizationMode
AgoraCameraStabilizationMode
Definition: AgoraEnumerates.h:2738
AgoraFaceInfoDelegate.h
AgoraVideoFrame
Definition: AgoraObjects.h:1812
AgoraSimulcastStreamConfig
Definition: AgoraObjects.h:3052
AgoraLocalAudioMixerConfiguration
Definition: AgoraObjects.h:2733
AgoraVoiceConversionPreset
AgoraVoiceConversionPreset
Definition: AgoraEnumerates.h:1689
AgoraScreenCaptureParameters
Definition: AgoraObjects.h:2774
AgoraAudioRawFrameOperationMode
AgoraAudioRawFrameOperationMode
Definition: AgoraEnumerates.h:1390
+[AgoraRtcEngineKit destroy]
void destroy()
Destroys the AgoraRtcEngineKit object.
AgoraMediaRecorder.h
AgoraSegmentationProperty
Definition: AgoraObjects.h:2661
AgoraSimulcastConfig
Definition: AgoraObjects.h:3086
AgoraVoiceAITunerType
AgoraVoiceAITunerType
Definition: AgoraEnumerates.h:1758
AgoraContentInspectConfig
Definition: AgoraObjects.h:3155
AgoraAudioEncodedFrameDelegateConfig
Definition: AgoraObjects.h:3136
AgoraDirectCdnStreamingMediaOptions
Definition: AgoraObjects.h:227
AgoraH265TranscoderProtocol.h
AgoraAudioProfile
AgoraAudioProfile
Definition: AgoraEnumerates.h:1268
AgoraVideoDenoiserOptions
Definition: AgoraObjects.h:2585
AgoraLastmileProbeConfig
Definition: AgoraObjects.h:635
-[AgoraRtcEngineKit stopLocalVideoTranscoder]
int stopLocalVideoTranscoder()
AgoraFaceShapeArea
AgoraFaceShapeArea
The specific facial area to be adjusted.
Definition: AgoraEnumerates.h:2059
-[AgoraRtcEngineKit stopLastmileProbeTest]
int stopLastmileProbeTest()
WatermarkOptions
Definition: AgoraObjects.h:1427
AgoraVideoSourceType
AgoraVideoSourceType
Definition: AgoraEnumerates.h:3043
-[AgoraRtcEngineKit createMediaPlayerCacheManager]
id< AgoraRtcMediaPlayerCacheManagerProtocol > _Nullable createMediaPlayerCacheManager()
-[AgoraRtcEngineKit stopScreenCapture]
int stopScreenCapture()
-[AgoraRtcEngineKit getCurrentMonotonicTimeInMs]
int64_t getCurrentMonotonicTimeInMs()
-[AgoraRtcEngineKit stopDirectCdnStreaming]
int stopDirectCdnStreaming()
AgoraQoEPreferenceType
AgoraQoEPreferenceType
Definition: AgoraEnumerates.h:2905
VIEW_CLASS
UIView VIEW_CLASS
Definition: AgoraObjects.h:14
AgoraChannelProfile
AgoraChannelProfile
Definition: AgoraEnumerates.h:497
-[AgoraRtcEngineKit uploadLogFile]
NSString *_Nullable uploadLogFile()
-[AgoraRtcEngineKit pauseAllChannelMediaRelay]
int pauseAllChannelMediaRelay()
-[AgoraRtcEngineKit stopPreview]
int stopPreview()
AgoraLeaveChannelOptions
Definition: AgoraObjects.h:2174
AgoraDataStreamConfig
Definition: AgoraObjects.h:2383
AgoraMediaRecorderDelegate.h
-[AgoraRtcEngineKit stopLocalAudioMixer]
int stopLocalAudioMixer()
Stops the local audio mixing.
-[AgoraRtcEngineKit getH265Transcoder]
id< AgoraH265TranscoderProtocol >_Nullable getH265Transcoder()
AgoraUserInfo
Definition: AgoraObjects.h:2317
AgoraRtcAudioSpectrumDelegate.h
AgoraVoiceBeautifierPreset
AgoraVoiceBeautifierPreset
Definition: AgoraEnumerates.h:1436
-[AgoraRtcEngineKit disableAudioSpectrumMonitor]
int disableAudioSpectrumMonitor()
AgoraRtcEngineConfig
Definition: AgoraObjects.h:1974
AgoraMediaMetadataDataSource.h
AgoraImageTrackOptions
Definition: AgoraObjects.h:3406
AgoraVideoRenderMode
AgoraVideoRenderMode
Definition: AgoraEnumerates.h:847
AgoraAudioEncodedFrameDelegate.h
AgoraVideoEffectObject.h
AgoraEncryptionConfig
Definition: AgoraObjects.h:2298
AgoraAudioFrameDelegate.h
AgoraEncodedVideoFrameInfo
Definition: AgoraObjects.h:3252
AgoraChannelMediaRelayConfiguration
Definition: AgoraObjects.h:2412
AgoraVideoStreamType
AgoraVideoStreamType
Definition: AgoraEnumerates.h:817
-[AgoraRtcEngineKit stopPlaybackDeviceTest]
int stopPlaybackDeviceTest()
AgoraEchoTestConfiguration
Definition: AgoraObjects.h:3452
AgoraConnectionState
AgoraConnectionState
Definition: AgoraEnumerates.h:1918
AgoraHDRCapability
AgoraHDRCapability
Definition: AgoraEnumerates.h:3904
-[AgoraRtcEngineKit getCallId]
NSString *_Nullable getCallId()
AgoraAdvancedAudioOptions
Definition: AgoraObjects.h:3400
AgoraScreenScenarioType
AgoraScreenScenarioType
Definition: AgoraEnumerates.h:2929
AgoraEncodedVideoFrameDelegate.h
-[AgoraRtcEngineKit getFaceShapeBeautyOptions]
AgoraFaceShapeBeautyOptions *_Nullable getFaceShapeBeautyOptions()
-[AgoraRtcEngineKit resumeAllChannelMediaRelay]
int resumeAllChannelMediaRelay()
AgoraObjects.h
AgoraLocalAccessPointConfiguration
Definition: AgoraObjects.h:3328
AgoraConstants.h
-[AgoraRtcEngineKit disableAudio]
int disableAudio()
-[AgoraRtcEngineKit stopRhythmPlayer]
int stopRhythmPlayer()
-[AgoraRtcEngineKit createCustomVideoTrack]
unsigned int createCustomVideoTrack()
-[AgoraRtcEngineKit disableVideo]
int disableVideo()
AgoraFaceShapeBeautyOptions
Definition: AgoraObjects.h:2537
+[AgoraRtcEngineKit getSdkVersion]
NSString *_Nonnull getSdkVersion()
AgoraVirtualBackgroundSource
Definition: AgoraObjects.h:2630
AgoraRtcMediaPlayerDelegate.h
-[AgoraRtcEngineKit startPreview]
int startPreview()
AgoraSnapshotConfig
Definition: AgoraObjects.h:3164
AgoraLowlightEnhanceOptions
Definition: AgoraObjects.h:2602
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
Definition: AgoraEnumerates.h:3114
__deprecated
#define __deprecated
Definition: AgoraBase.h:74
AgoraDirectCdnStreamingEventDelegate.h
AgoraExternalVideoSourceType
AgoraExternalVideoSourceType
Definition: AgoraEnumerates.h:3100
-[AgoraRtcEngineKit getAudioTrackCount]
int getAudioTrackCount()
AgoraLocalTranscoderConfiguration
Definition: AgoraObjects.h:2751
AgoraRtcVideoCanvas
Definition: AgoraObjects.h:555
AgoraRtcEngineDelegate.h
AgoraApplicationScenarioType
AgoraApplicationScenarioType
Definition: AgoraEnumerates.h:2884
AgoraAudioRecordingConfiguration
Definition: AgoraObjects.h:3015
AgoraMetadataType
AgoraMetadataType
Definition: AgoraEnumerates.h:2526
AgoraColorEnhanceOptions
Definition: AgoraObjects.h:2617
-[AgoraRtcEngineKit getNtpWallTimeInMs]
uint64_t getNtpWallTimeInMs()
AgoraClientRoleOptions
Definition: AgoraObjects.h:2330
AgoraMediaSourceType
AgoraMediaSourceType
Definition: AgoraEnumerates.h:2946
AgoraNetworkQuality
AgoraNetworkQuality
Definition: AgoraEnumerates.h:738
-[AgoraRtcEngineKit stopRecordingDeviceTest]
int stopRecordingDeviceTest()
-[AgoraRtcEngineKit queryCameraFocalLengthCapability]
NSArray< AgoraFocalLengthInfo * > *_Nullable queryCameraFocalLengthCapability()
AgoraCameraCapturerConfiguration
Definition: AgoraObjects.h:2340
AgoraCloudProxyType
AgoraCloudProxyType
Definition: AgoraEnumerates.h:600
-[AgoraRtcEngineKit enableVideo]
int enableVideo()
AgoraScreenCaptureFrameRateCapability
AgoraScreenCaptureFrameRateCapability
Definition: AgoraEnumerates.h:3772
AgoraExtensionInfo
Definition: AgoraObjects.h:3582
-[AgoraRtcEngineKit queryCodecCapability]
NSArray< AgoraVideoCodecCapInfo * > *_Nullable queryCodecCapability()
AgoraLogLevel
AgoraLogLevel
Definition: AgoraEnumerates.h:2547
AgoraChannelStats
Definition: AgoraObjects.h:1062
-[AgoraRtcEngineKit queryScreenCaptureCapability]
AgoraScreenCaptureFrameRateCapability queryScreenCaptureCapability()