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
58 @property(nonatomic, weak) id<AgoraRtcEngineDelegate> _Nullable delegate;
59
87 + (instancetype _Nonnull)sharedEngineWithAppId:(NSString * _Nonnull)appId
88 delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate NS_SWIFT_NAME(sharedEngine(withAppId:delegate:));
89
115 + (instancetype _Nonnull)sharedEngineWithConfig:(AgoraRtcEngineConfig * _Nonnull)config
116 delegate:(id<AgoraRtcEngineDelegate> _Nullable)delegate NS_SWIFT_NAME(sharedEngine(with:delegate:));
117
176 - (int)preloadChannelByToken:(NSString * _Nullable)token
177 channelId:(NSString * _Nonnull)channelId
178 uid:(NSUInteger)uid NS_SWIFT_NAME(preloadChannel(byToken:channelId:uid:));
179
245 - (int)preloadChannelByTokenWithUserAccount:(NSString * _Nullable)token
246 channelId:(NSString * _Nonnull)channelId
247 userAccount:(NSString * _Nonnull)userAccount NS_SWIFT_NAME(preloadChannelWithUserAccount(byToken:channelId:userAccount:));
248
270 - (int)updatePreloadChannelToken:(NSString * _Nonnull)token NS_SWIFT_NAME(updatePreloadChannelToken(_:));
271
351 - (int)joinChannelByToken:(NSString * _Nullable)token
352 channelId:(NSString * _Nonnull)channelId
353 info:(NSString * _Nullable)info
354 uid:(NSUInteger)uid
355 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:info:uid:joinSuccess:));
356
440 - (int)joinChannelByToken:(NSString * _Nullable)token
441 channelId:(NSString * _Nonnull)channelId
442 uid:(NSUInteger)uid
443 mediaOptions:(AgoraRtcChannelMediaOptions * _Nonnull)mediaOptions
444 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:uid:mediaOptions:joinSuccess:));
445
478 - (int)leaveChannel:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannel(_:));
479
510 - (int)leaveChannel:(AgoraLeaveChannelOptions * _Nonnull)options
511 leaveChannelBlock:(void (^ _Nullable)(AgoraChannelStats * _Nonnull))leaveChannelBlock NS_SWIFT_NAME(leaveChannel(_:leaveChannelBlock:));
512
537 - (int)setChannelProfile:(AgoraChannelProfile)profile NS_SWIFT_NAME(setChannelProfile(_:));
538
559 - (int)updateChannelWithMediaOptions:(AgoraRtcChannelMediaOptions* _Nonnull)mediaOptions NS_SWIFT_NAME(updateChannel(with:));
560
605 - (int)setClientRole:(AgoraClientRole)role NS_SWIFT_NAME(setClientRole(_:));
606
660 - (int)setClientRole:(AgoraClientRole)role options:(AgoraClientRoleOptions * _Nullable)options NS_SWIFT_NAME(setClientRole(_:options:));
661
690 - (int)renewToken:(NSString * _Nonnull)token NS_SWIFT_NAME(renewToken(_:));
691
701 - (AgoraConnectionState)getConnectionState NS_SWIFT_NAME(getConnectionState());
702
739 - (int)startOrUpdateChannelMediaRelay:(AgoraChannelMediaRelayConfiguration * _Nonnull)config NS_SWIFT_NAME(startOrUpdateChannelMediaRelay(_:));
740
763 - (int)stopChannelMediaRelay NS_SWIFT_NAME(stopChannelMediaRelay());
764
780 - (int)pauseAllChannelMediaRelay NS_SWIFT_NAME(pauseAllChannelMediaRelay());
781
796 - (int)resumeAllChannelMediaRelay NS_SWIFT_NAME(resumeAllChannelMediaRelay());
797
851 - (int)startLocalVideoTranscoder:(AgoraLocalTranscoderConfiguration* _Nonnull)config NS_SWIFT_NAME(startLocalVideoTranscoder(_:));
852
871 - (int)updateLocalTranscoderConfiguration:(AgoraLocalTranscoderConfiguration* _Nonnull)config NS_SWIFT_NAME(updateLocalTranscoderConfiguration(_:));
872
884 - (int)stopLocalVideoTranscoder NS_SWIFT_NAME(stopLocalVideoTranscoder());
885
919 - (int)startLocalAudioMixer:(AgoraLocalAudioMixerConfiguration* _Nonnull)config NS_SWIFT_NAME(startLocalAudioMixer(_:));
920
941 - (int)updateLocalAudioMixerConfiguration:(AgoraLocalAudioMixerConfiguration* _Nonnull)config NS_SWIFT_NAME(updateLocalAudioMixerConfiguration(_:));
942
957 - (int)stopLocalAudioMixer NS_SWIFT_NAME(stopLocalAudioMixer());
958
988 - (int)startMediaRenderingTracing NS_SWIFT_NAME(startMediaRenderingTracing());
989
1013 - (int)enableInstantMediaRendering NS_SWIFT_NAME(enableInstantMediaRendering());
1014
1031 + (void)destroy NS_SWIFT_NAME(destroy());
1032
1053 + (void)destroy:(void (^ _Nullable)(void))engineReleasedBlock NS_SWIFT_NAME(destroy(_:));
1054
1055 #pragma mark Core Audio
1056
1081 - (int)enableAudio NS_SWIFT_NAME(enableAudio());
1082
1104 - (int)disableAudio NS_SWIFT_NAME(disableAudio());
1105
1136 - (int)enableLocalAudio:(BOOL)enabled NS_SWIFT_NAME(enableLocalAudio(_:));
1137
1156 - (int)setAudioProfile:(AgoraAudioProfile)profile NS_SWIFT_NAME(setAudioProfile(_:));
1157
1179 - (int)setAudioScenario:(AgoraAudioScenario)scenario NS_SWIFT_NAME(setAudioScenario(_:));
1180
1216 - (int)enableAudioVolumeIndication:(NSInteger)interval
1217 smooth:(NSInteger)smooth
1218 reportVad:(BOOL)reportVad NS_SWIFT_NAME(enableAudioVolumeIndication(_:smooth:reportVad:));
1219
1220
1221 #if TARGET_OS_IPHONE
1222
1249 - (int)setEnableSpeakerphone:(BOOL)enableSpeaker NS_SWIFT_NAME(setEnableSpeakerphone(_:));
1250
1262 - (BOOL)isSpeakerphoneEnabled NS_SWIFT_NAME(isSpeakerphoneEnabled());
1263
1296 - (int)setDefaultAudioRouteToSpeakerphone:(BOOL)defaultToSpeaker NS_SWIFT_NAME(setDefaultAudioRouteToSpeakerphone(_:));
1297 #endif
1298
1316 - (int)adjustRecordingSignalVolume:(NSInteger)volume NS_SWIFT_NAME(adjustRecordingSignalVolume(_:));
1317
1336 - (int)adjustPlaybackSignalVolume:(NSInteger)volume NS_SWIFT_NAME(adjustPlaybackSignalVolume(_:));
1337
1357 - (int)adjustUserPlaybackSignalVolume:(NSUInteger)uid volume:(int)volume NS_SWIFT_NAME(adjustUserPlaybackSignalVolume(_:volume:));
1358
1378 - (int)muteRecordingSignal:(BOOL)muted NS_SWIFT_NAME(muteRecordingSignal(_:));
1379
1401 - (int)muteLocalAudioStream:(BOOL)mute NS_SWIFT_NAME(muteLocalAudioStream(_:));
1402
1420 - (int)muteRemoteAudioStream:(NSUInteger)uid mute:(BOOL)mute NS_SWIFT_NAME(muteRemoteAudioStream(_:mute:));
1421
1446 - (int)muteAllRemoteAudioStreams:(BOOL)mute NS_SWIFT_NAME(muteAllRemoteAudioStreams(_:));
1447
1474 - (int)startRecordingDeviceTest:(int)indicationInterval NS_SWIFT_NAME(startRecordingDeviceTest(_:));
1475
1489 - (int)stopRecordingDeviceTest NS_SWIFT_NAME(stopRecordingDeviceTest());
1490
1516 - (int)startPlaybackDeviceTest:(NSString * _Nonnull)audioFileName NS_SWIFT_NAME(startPlaybackDeviceTest(_:));
1517
1531 - (int)stopPlaybackDeviceTest NS_SWIFT_NAME(stopPlaybackDeviceTest());
1532
1564 - (int)registerExtensionWithVendor:(NSString * _Nonnull)provider
1565 extension:(NSString * _Nonnull)extension
1566 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(registerExtension(withVendor:extension:sourceType:));
1567
1587 - (int)enableExtensionWithVendor:(NSString * _Nonnull)provider extension:(NSString * _Nonnull)extension enabled:(BOOL)enabled NS_SWIFT_NAME(enableExtension(withVendor:extension:enabled:));
1588
1614 - (int)enableExtensionWithVendor:(NSString * _Nonnull)provider
1615 extension:(NSString * _Nonnull)extension
1616 enabled:(BOOL)enabled
1617 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(enableExtension(withVendor:extension:enabled:sourceType:));
1618
1639 - (int)enableExtensionWithVendor:(NSString * _Nonnull)provider
1640 extension:(NSString * _Nonnull)extension
1641 extensionInfo:(AgoraExtensionInfo * _Nonnull)extensionInfo
1642 enabled:(BOOL)enabled NS_SWIFT_NAME(enableExtension(withVendor:extension:extensionInfo:enabled:));
1643
1664 - (int)setExtensionProviderPropertyWithVendor:(NSString * _Nonnull)provider
1665 key:(NSString * _Nonnull)key
1666 value:(NSString * _Nonnull)value NS_SWIFT_NAME(setExtensionProviderPropertyWithVendor(_:key:value:));
1667
1690 - (int)setExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1691 extension:(NSString * _Nonnull)extension
1692 key:(NSString * _Nonnull)key
1693 value:(NSString * _Nonnull)value NS_SWIFT_NAME(setExtensionPropertyWithVendor(_:extension:key:value:));
1694
1708 - (int)setExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1709 extension:(NSString * _Nonnull)extension
1710 key:(NSString * _Nonnull)key
1711 value:(NSString * _Nonnull)value
1712 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setExtensionPropertyWithVendor(_:extension:key:value:sourceType:));
1713
1727 - (int)setExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1728 extension:(NSString * _Nonnull)extension
1729 extensionInfo:(AgoraExtensionInfo * _Nonnull)extensionInfo
1730 key:(NSString * _Nonnull)key
1731 value:(NSString * _Nonnull)value NS_SWIFT_NAME(setExtensionPropertyWithVendor(_:extension:extensionInfo:key:value:));
1732
1747 - (NSString * _Nullable)getExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1748 extension:(NSString * _Nonnull)extension
1749 key:(NSString * _Nonnull)key NS_SWIFT_NAME(getExtensionProperty(withVendor:extension:key:));
1750
1766 - (NSString * _Nullable)getExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1767 extension:(NSString * _Nonnull)extension
1768 key:(NSString * _Nonnull)key
1769 sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(getExtensionProperty(withVendor:extension:key:sourceType:));
1770
1782 - (NSString * _Nullable)getExtensionPropertyWithVendor:(NSString * _Nonnull)provider
1783 extension:(NSString * _Nonnull)extension
1784 extensionInfo:(AgoraExtensionInfo * _Nonnull)extensionInfo
1785 key:(NSString * _Nonnull)key NS_SWIFT_NAME(getExtensionProperty(withVendor:extension:extensionInfo:key:));
1786
1787 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
1788
1817 - (int)enableLoopbackRecording:(BOOL)enabled deviceName:(NSString* _Nullable)deviceName NS_SWIFT_NAME(enableLoopbackRecording(_:deviceName:));
1818
1833 - (int)adjustLoopbackSignalVolume:(NSInteger)volume NS_SWIFT_NAME(adjustLoopbackSignalVolume(_:));
1834
1841 - (int)getLoopbackRecordingVolume NS_SWIFT_NAME(getLoopbackRecordingVolume());
1842 #endif
1843
1844 #pragma mark Core Video
1845
1874 - (int)enableVideo NS_SWIFT_NAME(enableVideo());
1875
1902 - (int)disableVideo NS_SWIFT_NAME(disableVideo());
1903
1933 - (int)enableLocalVideo:(BOOL)enabled NS_SWIFT_NAME(enableLocalVideo(_:));
1934
1944 - (NSArray <AgoraVideoCodecCapInfo *> *_Nullable)queryCodecCapability;
1945
1962 - (int)queryDeviceScore NS_SWIFT_NAME(queryDeviceScore());
1963
1976 - (AgoraHDRCapability)queryHDRCapability:(AgoraVideoModule)videoModule NS_SWIFT_NAME(queryHDRCapability(_:));
1977
2003 - (int)setVideoEncoderConfiguration:(AgoraVideoEncoderConfiguration * _Nonnull)config NS_SWIFT_NAME(setVideoEncoderConfiguration(_:));
2004
2036 - (int)setupLocalVideo:(AgoraRtcVideoCanvas * _Nullable)local NS_SWIFT_NAME(setupLocalVideo(_:));
2037
2058 - (int)setLocalRenderTargetFps:(AgoraVideoSourceType)sourceType
2059 targetFps:(int)targetFps;
2079 - (int)setRemoteRenderTargetFps:(int)targetFps;
2080
2106 - (int)setLocalRenderMode:(AgoraVideoRenderMode)mode
2107 mirror:(AgoraVideoMirrorMode)mirror NS_SWIFT_NAME(setLocalRenderMode(_:mirror:));
2108
2125 - (int)startPreview NS_SWIFT_NAME(startPreview());
2126
2146 - (int)startPreview: (AgoraVideoSourceType)sourceType NS_SWIFT_NAME(startPreview(_:));
2147
2155 - (int)stopPreview NS_SWIFT_NAME(stopPreview());
2156
2171 - (int)stopPreview: (AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopPreview(_:));
2172
2200 - (int)setupRemoteVideo:(AgoraRtcVideoCanvas * _Nonnull)remote NS_SWIFT_NAME(setupRemoteVideo(_:));
2201
2222 - (int)setRemoteRenderMode:(NSUInteger)uid
2223 mode:(AgoraVideoRenderMode)mode
2224 mirror:(AgoraVideoMirrorMode)mirror NS_SWIFT_NAME(setRemoteRenderMode(_:mode:mirror:));
2225
2249 - (int)muteLocalVideoStream:(BOOL)mute NS_SWIFT_NAME(muteLocalVideoStream(_:));
2250
2268 - (int)muteRemoteVideoStream:(NSUInteger)uid
2269 mute:(BOOL)mute NS_SWIFT_NAME(muteRemoteVideoStream(_:mute:));
2270
2295 - (int)muteAllRemoteVideoStreams:(BOOL)mute NS_SWIFT_NAME(muteAllRemoteVideoStreams(_:));
2296
2324 - (int)setBeautyEffectOptions:(BOOL)enable options:(AgoraBeautyOptions* _Nullable)options NS_SWIFT_NAME(setBeautyEffectOptions(_:options:));
2325
2352 - (int)setBeautyEffectOptions:(BOOL)enable options:(AgoraBeautyOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setBeautyEffectOptions(_:options:sourceType:));
2353
2382 - (int)setFaceShapeBeautyOptions:(BOOL)enable options:(AgoraFaceShapeBeautyOptions* _Nullable)options NS_SWIFT_NAME(setFaceShapeBeautyOptions(_:options:));
2383
2422 - (int)setFaceShapeBeautyOptions:(BOOL)enable options:(AgoraFaceShapeBeautyOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setFaceShapeBeautyOptions(_:options:sourceType:));
2423
2438 - (AgoraFaceShapeBeautyOptions * _Nullable)getFaceShapeBeautyOptions NS_SWIFT_NAME(getFaceShapeBeautyOptions());
2439
2461 - (AgoraFaceShapeBeautyOptions * _Nullable)getFaceShapeBeautyOptions:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(getFaceShapeBeautyOptions(_:));
2462
2490 - (int)setFaceShapeAreaOptions:(AgoraFaceShapeAreaOptions* _Nullable)options NS_SWIFT_NAME(setFaceShapeAreaOptions(_:));
2491
2525 - (int)setFaceShapeAreaOptions:(AgoraFaceShapeAreaOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setFaceShapeAreaOptions(_:sourceType:));
2526
2543 - (AgoraFaceShapeAreaOptions * _Nullable)getFaceShapeAreaOptions:(AgoraFaceShapeArea) area NS_SWIFT_NAME(getFaceShapeAreaOptions(_:));
2544
2567 - (AgoraFaceShapeAreaOptions * _Nullable)getFaceShapeAreaOptions:(AgoraFaceShapeArea) area sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(getFaceShapeAreaOptions(_:sourceType:));
2568
2610 - (int)setVideoDenoiserOptions:(BOOL)enable options:(AgoraVideoDenoiserOptions* _Nullable)options NS_SWIFT_NAME(setVideoDenoiserOptions(_:options:));
2611
2660 - (int)setVideoDenoiserOptions:(BOOL)enable options:(AgoraVideoDenoiserOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setVideoDenoiserOptions(_:options:sourceType:));
2661
2662
2688 - (int)setFilterEffectOptions:(BOOL)enable options:(AgoraFilterEffectOptions* _Nullable)options NS_SWIFT_NAME(setFilterEffectOptions(_:options:));
2689
2724 - (int)setFilterEffectOptions:(BOOL)enable options:(AgoraFilterEffectOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setFilterEffectOptions(_:options:sourceType:));
2725
2726 #pragma mark VideoEffectObject
2727
2743 - (id<AgoraVideoEffectObject> _Nullable)createVideoEffectObjectWithBundlePath:(NSString * _Nonnull)bundlePath
2744 sourceType:(AgoraMediaSourceType)sourceType
2745 NS_SWIFT_NAME(createVideoEffectObject(bundlePath:sourceType:));
2746
2759 - (int)destroyVideoEffectObject:(id<AgoraVideoEffectObject> _Nullable)videoEffectObject
2760 NS_SWIFT_NAME(destroyVideoEffectObject(_:));
2761
2762
2805 - (int)setLowlightEnhanceOptions:(BOOL)enable options:(AgoraLowlightEnhanceOptions* _Nullable)options NS_SWIFT_NAME(setLowlightEnhanceOptions(_:options:));
2806
2844 - (int)setLowlightEnhanceOptions:(BOOL)enable options:(AgoraLowlightEnhanceOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setLowlightEnhanceOptions(_:options:sourceType:));
2845
2878 - (int)setColorEnhanceOptions:(BOOL)enable options:(AgoraColorEnhanceOptions* _Nullable)options NS_SWIFT_NAME(setColorEnhanceOptions(_:options:));
2879
2917 - (int)setColorEnhanceOptions:(BOOL)enable options:(AgoraColorEnhanceOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setColorEnhanceOptions(_:options:sourceType:));
2918
2971 - (int)enableVirtualBackground:(BOOL)enable backData:(AgoraVirtualBackgroundSource* _Nullable)backData segData:(AgoraSegmentationProperty* _Nullable)segData NS_SWIFT_NAME(enableVirtualBackground(_:backData:segData:));
2972
3033 - (int)enableVirtualBackground:(BOOL)enable backData:(AgoraVirtualBackgroundSource* _Nullable)backData segData:(AgoraSegmentationProperty* _Nullable)segData sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(enableVirtualBackground(_:backData:segData:sourceType:));
3034
3105 - (int)setVideoScenario:(AgoraApplicationScenarioType)scenarioType NS_SWIFT_NAME(setVideoScenario(_:));
3106
3118 - (int)setVideoQoEPreference:(AgoraQoEPreferenceType)preferenceType NS_SWIFT_NAME(setVideoQoEPreference(_:));
3119
3140 - (BOOL)isFeatureAvailableOnDevice:(AgoraFeatureType)type;
3141
3142 #pragma mark Audio Effect
3143
3156 - (int)setLocalVoicePitch:(double)pitch NS_SWIFT_NAME(setLocalVoicePitch(_:));
3157
3178 - (int)setLocalVoiceFormant:(double)formantRatio;
3179
3196 - (int)setLocalVoiceEqualizationOfBandFrequency:(AgoraAudioEqualizationBandFrequency)bandFrequency withGain:(NSInteger)gain NS_SWIFT_NAME(setLocalVoiceEqualizationOf(_:withGain:));
3197
3215 - (int)setLocalVoiceReverbOfType:(AgoraAudioReverbType)reverbType withValue:(NSInteger)value NS_SWIFT_NAME(setLocalVoiceReverbOf(_:withValue:));
3216
3217 #pragma mark Audio Effect Playback
3218
3237 - (int)preloadEffect:(int)soundId
3238 filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffect(_:filePath:));
3239
3264 - (int)preloadEffect:(int)soundId
3265 filePath:(NSString* _Nonnull)filePath
3266 startPos:(int)startPos NS_SWIFT_NAME(preloadEffect(_:filePath:startPos:));
3267
3311 - (int)playEffect:(int)soundId
3312 filePath:(NSString* _Nonnull)filePath
3313 loopCount:(NSInteger)loopCount
3314 pitch:(double)pitch
3315 pan:(double)pan
3316 gain:(NSInteger)gain NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:));
3317
3318
3363 - (int)playEffect:(int)soundId
3364 filePath:(NSString* _Nonnull)filePath
3365 loopCount:(NSInteger)loopCount
3366 pitch:(double)pitch
3367 pan:(double)pan
3368 gain:(NSInteger)gain
3369 startPos:(int)startPos NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:startPos:));
3370
3418 - (int)playEffect:(int)soundId
3419 filePath:(NSString* _Nonnull)filePath
3420 loopCount:(NSInteger)loopCount
3421 pitch:(double)pitch
3422 pan:(double)pan
3423 gain:(NSInteger)gain
3424 publish:(BOOL)publish NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:publish:));
3425
3475 - (int)playEffect:(int)soundId
3476 filePath:(NSString* _Nonnull)filePath
3477 loopCount:(NSInteger)loopCount
3478 pitch:(double)pitch
3479 pan:(double)pan
3480 gain:(NSInteger)gain
3481 publish:(BOOL)publish
3482 startPos:(int)startPos NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:publish:startPos:));
3483
3514 - (int)playAllEffectsWithLoopCount:(NSInteger)loopCount
3515 pitch:(double)pitch
3516 pan:(double)pan
3517 gain:(NSInteger)gain
3518 publish:(BOOL)publish NS_SWIFT_NAME(playAllEffects(withLoopCount:pitch:pan:gain:publish:));
3519
3533 - (int)getEffectsVolume NS_SWIFT_NAME(getEffectsVolume());
3534
3549 - (int)setEffectsVolume:(NSInteger)volume NS_SWIFT_NAME(setEffectsVolume(_:));
3550
3566 - (int)setVolumeOfEffect:(int)soundId
3567 withVolume:(int)volume NS_SWIFT_NAME(setVolumeOfEffect(_:withVolume:));
3568
3579 - (int)getVolumeOfEffect:(int)soundId NS_SWIFT_NAME(getVolumeOfEffect(_:));
3580
3590 - (int)pauseEffect:(int)soundId NS_SWIFT_NAME(pauseEffect(_:));
3591
3599 - (int)pauseAllEffects NS_SWIFT_NAME(pauseAllEffects());
3600
3610 - (int)resumeEffect:(int)soundId NS_SWIFT_NAME(resumeEffect(_:));
3611
3624 - (int)resumeAllEffects NS_SWIFT_NAME(resumeAllEffects());
3625
3642 - (int)stopEffect:(int)soundId NS_SWIFT_NAME(stopEffect(_:));
3643
3658 - (int)stopAllEffects NS_SWIFT_NAME(stopAllEffects());
3659
3673 - (int)getEffectDuration:(NSString* _Nonnull)filePath NS_SWIFT_NAME(getEffectDuration(_:));
3674
3690 - (int)setEffectPosition:(int)soundId pos:(NSInteger)pos NS_SWIFT_NAME(setEffectPosition(_:pos:));
3691
3703 - (int)getEffectCurrentPosition:(int)soundId NS_SWIFT_NAME(getEffectCurrentPosition(_:));
3704
3719 - (int)unloadEffect:(int)soundId NS_SWIFT_NAME(unloadEffect(_:));
3720
3727 - (int)unloadAllEffects NS_SWIFT_NAME(unloadAllEffects());
3728
3729 #pragma mark beautifier effect
3730
3769 - (int)setVoiceBeautifierPreset:(AgoraVoiceBeautifierPreset)preset NS_SWIFT_NAME(setVoiceBeautifierPreset(_:));
3770
3810 - (int)setAudioEffectPreset:(AgoraAudioEffectPreset)preset NS_SWIFT_NAME(setAudioEffectPreset(_:));
3811
3853 - (int)setVoiceConversionPreset:(AgoraVoiceConversionPreset)preset NS_SWIFT_NAME(setVoiceConversionPreset(_:));
3854
3929 - (int)setAudioEffectParameters:(AgoraAudioEffectPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setAudioEffectParameters(_:param1:param2:));
3930
3979 - (int)setVoiceBeautifierParameters:(AgoraVoiceBeautifierPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setVoiceBeautifierParameters(_:param1:param2:));
3980
3993 - (int)setVoiceConversionParameters:(AgoraVoiceConversionPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setVoiceConversionParameters(_:param1:param2:));
3994
4012 - (int)setHeadphoneEQPreset:(AgoraHeadphoneEQPreset)preset NS_SWIFT_NAME(setHeadphoneEQPreset(_:));
4013
4032 - (int)setHeadphoneEQParameters:(int)lowGain highGain:(int)highGain NS_SWIFT_NAME(setHeadphoneEQParameters(_:highGain:));
4033
4052 - (int)enableVoiceAITuner:(BOOL)enabled type:(AgoraVoiceAITunerType)type NS_SWIFT_NAME(enableVoiceAITuner(_:type:));
4053
4054 #pragma mark Sound Position Indication
4055
4071 - (int)enableSoundPositionIndication:(BOOL)enabled NS_SWIFT_NAME(enableSoundPositionIndication(_:));
4072
4102 - (int)setRemoteVoicePosition:(NSUInteger)uid pan:(double)pan gain:(double)gain NS_SWIFT_NAME(setRemoteVoicePosition(_:pan:gain:));
4103
4126 - (int)enableSpatialAudio:(BOOL)enabled NS_SWIFT_NAME(enableSpatialAudio(_:));
4127
4143 - (int)setRemoteUserSpatialAudioParams:(NSUInteger)uid
4144 params:(AgoraSpatialAudioParams* _Nonnull)params NS_SWIFT_NAME(setRemoteUserSpatialAudioParams(_:params:));
4145
4146 #pragma mark Audio Noise Suppression
4147
4183 - (int)setAINSMode:(BOOL)enabled mode:(AUDIO_AINS_MODE)mode NS_SWIFT_NAME(setAINSMode(_:mode:));
4184
4185 #pragma mark Audio Mixing
4186
4231 - (int)startAudioMixing:(NSString * _Nonnull)filePath
4232 loopback:(BOOL)loopback
4233 cycle:(NSInteger)cycle NS_SWIFT_NAME(startAudioMixing(_:loopback:cycle:));
4234
4280 - (int)startAudioMixing:(NSString * _Nonnull)filePath
4281 loopback:(BOOL)loopback
4282 cycle:(NSInteger)cycle
4283 startPos:(NSInteger)startPos NS_SWIFT_NAME(startAudioMixing(_:loopback:cycle:startPos:));
4284
4297 - (int)stopAudioMixing NS_SWIFT_NAME(stopAudioMixing());
4298
4311 - (int)pauseAudioMixing NS_SWIFT_NAME(pauseAudioMixing());
4312
4325 - (int)resumeAudioMixing NS_SWIFT_NAME(resumeAudioMixing());
4326
4349 - (int)selectAudioTrack:(NSInteger)index NS_SWIFT_NAME(selectAudioTrack(_:));
4350
4362 - (int)getAudioTrackCount NS_SWIFT_NAME(getAudioTrackCount());
4363
4381 - (int)adjustAudioMixingVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingVolume(_:));
4382
4399 - (int)adjustAudioMixingPublishVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingPublishVolume(_:));
4400
4415 - (int)getAudioMixingPublishVolume NS_SWIFT_NAME(getAudioMixingPublishVolume());
4416
4432 - (int)adjustAudioMixingPlayoutVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingPlayoutVolume(_:));
4433
4447 - (int)getAudioMixingPlayoutVolume NS_SWIFT_NAME(getAudioMixingPlayoutVolume());
4448
4461 - (int)getAudioMixingDuration NS_SWIFT_NAME(getAudioMixingDuration());
4462
4481 - (int)getAudioMixingCurrentPosition NS_SWIFT_NAME(getAudioMixingCurrentPosition());
4482
4498 - (int)setAudioMixingPosition:(NSInteger)pos NS_SWIFT_NAME(setAudioMixingPosition(_:));
4499
4525 - (int)setAudioMixingDualMonoMode:(AgoraAudioMixingDualMonoMode)mode NS_SWIFT_NAME(setAudioMixingDualMonoMode(_:));
4526
4546 - (int)setAudioMixingPitch:(NSInteger)pitch NS_SWIFT_NAME(setAudioMixingPitch(_:));
4547
4566 - (int)setAudioMixingPlaybackSpeed:(NSInteger)speed NS_SWIFT_NAME(setAudioMixingPlaybackSpeed(_:));
4567
4568 #pragma mark Audio Recording
4569
4598 - (int)startAudioRecording:(NSString * _Nonnull)filePath
4599 quality:(AgoraAudioRecordingQuality)quality NS_SWIFT_NAME(startAudioRecording(_:quality:));
4600
4622 - (int)startAudioRecordingWithConfig:(AgoraAudioRecordingConfiguration * _Nonnull)config NS_SWIFT_NAME(startAudioRecording(withConfig:));
4623
4641 - (int)setAudioEncodedFrameDelegate:(id<AgoraAudioEncodedFrameDelegate> _Nullable)delegate config:(AgoraAudioEncodedFrameDelegateConfig * _Nonnull)config NS_SWIFT_NAME(setAudioEncodedFrameDelegate(_:config:));
4642
4650 - (int)stopAudioRecording NS_SWIFT_NAME(stopAudioRecording());
4651
4652 #pragma mark Echo Test
4653
4680 - (int)startEchoTestWithConfig:(AgoraEchoTestConfiguration* _Nonnull)config NS_SWIFT_NAME(startEchoTest(withConfig:));
4681
4694 - (int)stopEchoTest NS_SWIFT_NAME(stopEchoTest());
4695
4696
4697 #pragma mark Miscellaneous Audio Control
4698
4716 - (int)enableInEarMonitoring:(BOOL)enabled NS_SWIFT_NAME(enable(inEarMonitoring:));
4717
4738 - (int)enableInEarMonitoring:(BOOL)enabled includeAudioFilters:(AgoraEarMonitoringFilterType)includeAudioFilters NS_SWIFT_NAME(enable(inEarMonitoring:includeAudioFilters:));
4739
4757 - (int)setInEarMonitoringVolume:(NSInteger)volume NS_SWIFT_NAME(setInEarMonitoringVolume(_:));
4758
4759 #if TARGET_OS_IPHONE
4760
4781 - (void)setAudioSessionOperationRestriction:(AgoraAudioSessionOperationRestriction)restriction NS_SWIFT_NAME(setAudioSessionOperationRestriction(_:));
4782 #endif
4783
4784 #pragma mark Dual Video Mode
4785
4812 - (int)enableDualStreamMode:(BOOL)enabled NS_SWIFT_NAME(enableDualStreamMode(_:)) __deprecated_msg("use setDualStreamMode: instead.");
4813
4845 - (int)enableDualStreamMode:(BOOL)enabled
4846 streamConfig:(AgoraSimulcastStreamConfig* _Nonnull)streamConfig NS_SWIFT_NAME(enableDualStreamMode(_:streamConfig:)) __deprecated_msg("use setDualStreamMode: instead.");
4847
4878 - (int)setDualStreamMode:(AgoraSimulcastStreamMode)mode NS_SWIFT_NAME(setDualStreamMode(_:));
4879
4917 - (int)setDualStreamMode:(AgoraSimulcastStreamMode)mode
4918 streamConfig:(AgoraSimulcastStreamConfig* _Nonnull)streamConfig NS_SWIFT_NAME(setDualStreamMode(_:streamConfig:));
4919
4939 - (int)setSimulcastConfig:(AgoraSimulcastConfig* _Nonnull)simulcastConfig NS_SWIFT_NAME(setSimulcastConfig(_:));
4940
4977 - (int)setRemoteDefaultVideoStreamType:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteDefaultVideoStreamType(_:));
4978
5016 - (int)setRemoteVideoStream:(NSUInteger)uid
5017 type:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteVideoStream(_:type:));
5018
5043 - (int)setRemoteVideoSubscriptionOptions:(NSUInteger)uid
5044 options:(AgoraVideoSubscriptionOptions* _Nonnull)options NS_SWIFT_NAME(setRemoteVideoSubscriptionOptions(_:options:));
5045
5046 #pragma mark Subscribe Blocklist / Allowlist
5047
5074 - (int)setSubscribeAudioBlocklist:(NSArray <NSNumber *> *_Nonnull)blocklist NS_SWIFT_NAME(setSubscribeAudioBlocklist(_:));
5075
5101 - (int)setSubscribeAudioAllowlist:(NSArray <NSNumber *> *_Nonnull)allowlist NS_SWIFT_NAME(setSubscribeAudioAllowlist(_:));
5102
5129 - (int)setSubscribeVideoBlocklist:(NSArray <NSNumber *> *_Nonnull)blocklist NS_SWIFT_NAME(setSubscribeVideoBlocklist(_:));
5130
5156 - (int)setSubscribeVideoAllowlist:(NSArray <NSNumber *> *_Nonnull)allowlist NS_SWIFT_NAME(setSubscribeVideoAllowlist(_:));
5157
5158 #pragma mark Stream Fallback
5159
5181 - (int)setRemoteSubscribeFallbackOption:(AgoraStreamFallbackOptions)option NS_SWIFT_NAME(setRemoteSubscribeFallbackOption(_:));
5182
5194 - (int)setHighPriorityUserList:(NSArray <NSNumber *> *_Nullable)uidList
5195 option:(AgoraStreamFallbackOptions)option;
5196
5197
5198 #pragma mark External Media Source
5199
5222 - (void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture sourceType:(AgoraExternalVideoSourceType)sourceType NS_SWIFT_NAME(setExternalVideoSource(_:useTexture:sourceType:));
5223
5243 - (void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture
5244 sourceType:(AgoraExternalVideoSourceType)sourceType
5245 encodedVideoTrackOption:(AgoraEncodedVideoTrackOptions* _Nonnull)encodedVideoTrackOption NS_SWIFT_NAME(setExternalVideoSource(_:useTexture:sourceType:encodedVideoTrackOption:));
5246
5261 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame NS_SWIFT_NAME(pushExternalVideoFrame(_:)) __deprecated_msg("use pushExternalVideoFrame:frame,videoTrackId options instead.");
5262
5297 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
5298
5313 - (int)pushExternalEncodedVideoFrame:(NSData* _Nonnull)frame
5314 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info NS_SWIFT_NAME(pushExternalEncodedVideoFrame(_:info:));
5315
5331 - (int)pushExternalEncodedVideoFrame:(NSData* _Nonnull)frame
5332 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
5333 videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrame(_:info:videoTrackId:));
5334
5335
5353 - (unsigned int)createCustomVideoTrack NS_SWIFT_NAME(createCustomVideoTrack());
5354
5362 - (unsigned int)createCustomEncodedVideoTrack:(AgoraEncodedVideoTrackOptions* _Nonnull)encodedVideoTrackOption NS_SWIFT_NAME(createCustomEncodedVideoTrack(_:));
5363
5373 - (int)destroyCustomVideoTrack:(NSUInteger)videoTrackId NS_SWIFT_NAME(destroyCustomVideoTrack(_:));
5374
5383 - (int)destroyCustomEncodedVideoTrack:(NSUInteger)videoTrackId NS_SWIFT_NAME(destroyCustomEncodedVideoTrack(_:));
5384
5385 #pragma mark External Audio Data
5386
5411 - (void)enableExternalAudioSink:(BOOL)enabled
5412 sampleRate:(NSUInteger)sampleRate
5413 channels:(NSUInteger)channels NS_SWIFT_NAME(enableExternalAudioSink(_:sampleRate:channels:));
5414
5451 - (BOOL)pullPlaybackAudioFrameRawData:(void * _Nonnull)data
5452 lengthInByte:(NSUInteger)lengthInByte NS_SWIFT_NAME(pullPlaybackAudioFrameRawData(_:lengthInByte:));
5453
5470 - (CMSampleBufferRef _Nullable)pullPlaybackAudioFrameSampleBufferByLengthInByte:(NSUInteger)lengthInByte NS_SWIFT_NAME(pullPlaybackAudioFrameSampleBufferBy(lengthInByte:));
5471
5499 - (int)createCustomAudioTrack:(AgoraAudioTrackType)trackType
5500 config:(AgoraAudioTrackConfig* _Nonnull)config;
5501
5511 - (int)destroyCustomAudioTrack:(NSInteger)trackId;
5512
5535 - (int)enableCustomAudioLocalPlayback:(NSInteger)trackId enabled:(BOOL)enabled NS_SWIFT_NAME(enableCustomAudioLocalPlayback(_:enabled:));
5536
5548 - (int)pushExternalAudioFrameRawData:(void * _Nonnull)data
5549 samples:(NSInteger)samples
5550 trackId:(NSInteger)trackId
5551 timestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(pushExternalAudioFrameRawData(_:samples:trackId:timestamp:)) __deprecated_msg("use pushExternalAudioFrameRawData:samples:sampleRate:channels:trackId:timestamp: instead.");
5552
5581 - (int)pushExternalAudioFrameRawData:(void* _Nonnull)data
5582 samples:(NSInteger)samples
5583 sampleRate:(NSInteger)sampleRate
5584 channels:(NSInteger)channels
5585 trackId:(NSInteger)trackId
5586 timestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(pushExternalAudioFrameRawData(_:samples:sampleRate:channels:trackId:timestamp:));
5587
5597 - (int)pushExternalAudioFrameSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer NS_SWIFT_NAME(pushExternalAudioFrameSampleBuffer(_:)) __deprecated_msg("use pushExternalAudioFrameSampleBuffer:sampleRate:channels:trackId: instead.");
5598
5622 - (int)pushExternalAudioFrameSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer
5623 sampleRate:(NSInteger)sampleRate
5624 channels:(NSInteger)channels
5625 trackId:(NSInteger)trackId NS_SWIFT_NAME(pushExternalAudioFrameSampleBuffer(_:sampleRate:channels:trackId:));
5626
5649 - (int)setRecordingAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5650 channel:(NSInteger)channel
5651 mode:(AgoraAudioRawFrameOperationMode)mode
5652 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setRecordingAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
5653
5676 - (int)setPlaybackAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5677 channel:(NSInteger)channel
5678 mode:(AgoraAudioRawFrameOperationMode)mode
5679 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setPlaybackAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
5680
5702 - (int)setMixedAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5703 channel:(NSInteger)channel
5704 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setMixedAudioFrameParametersWithSampleRate(_:channel:samplesPerCall:));
5705
5736 - (int)setEarMonitoringAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5737 channel:(NSInteger)channel
5738 mode:(AgoraAudioRawFrameOperationMode)mode
5739 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setEarMonitoringAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
5740
5759 - (int)setPlaybackAudioFrameBeforeMixingParametersWithSampleRate:(NSInteger)sampleRate
5760 channel:(NSInteger)channel NS_SWIFT_NAME(setPlaybackAudioFrameBeforeMixingParametersWithSampleRate(_:channel:));
5761
5785 - (int)setPlaybackAudioFrameBeforeMixingParametersWithSampleRate:(NSInteger)sampleRate
5786 channel:(NSInteger)channel
5787 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setPlaybackAudioFrameBeforeMixingParametersWithSampleRate(_:channel:samplesPerCall:));
5807 - (int)adjustCustomAudioPublishVolume:(NSInteger)trackId volume:(NSInteger)volume NS_SWIFT_NAME(adjustCustomAudioPublishVolume(_:volume:));
5808
5828 - (int)adjustCustomAudioPlayoutVolume:(NSInteger)trackId volume:(NSInteger)volume NS_SWIFT_NAME(adjustCustomAudioPlayoutVolume(_:volume:));
5829
5847 - (int64_t)getCurrentMonotonicTimeInMs NS_SWIFT_NAME(getCurrentMonotonicTimeInMs());
5848
5849 #pragma mark Audio spectrum monitor
5850
5868 - (int)registerAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable )delegate NS_SWIFT_NAME(registerAudioSpectrumDelegate(_:));
5869
5885 - (int)unregisterAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable)delegate NS_SWIFT_NAME(unregisterAudioSpectrumDelegate(_:));
5886
5905 - (int)enableAudioSpectrumMonitor:(int)intervalInMS NS_SWIFT_NAME(enableAudioSpectrumMonitor(_:));
5906
5920 - (int)disableAudioSpectrumMonitor NS_SWIFT_NAME(disableAudioSpectrumMonitor());
5921
5922 #pragma mark Built-in Encryption
5923
5952 - (int)enableEncryption:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig * _Nonnull)config NS_SWIFT_NAME(enableEncryption(_:encryptionConfig:));
5953
5954 #pragma mark Data Stream
5955
5994 - (int)createDataStream:(NSInteger * _Nonnull)streamId
5995 reliable:(BOOL)reliable
5996 ordered:(BOOL)ordered NS_SWIFT_NAME(createDataStream(_:reliable:ordered:));
5997
6021 - (int)createDataStream:(NSInteger * _Nonnull)streamId
6022 config:(AgoraDataStreamConfig * _Nonnull)config NS_SWIFT_NAME(createDataStream(_:config:));
6023
6055 - (int)sendStreamMessage:(NSInteger)streamId
6056 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendStreamMessage(_:data:));
6057
6058 #pragma mark Common Data Transmission
6059
6076 - (int)sendRdtMessage:(NSInteger)uid
6077 type:(AgoraRdtStreamType)type
6078 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendRdtMessage(_:type:data:));
6079
6091 - (int)sendMediaControlMessage:(NSInteger)uid
6092 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendMediaControlMessage(_:data:));
6093
6094 #pragma mark Stream Publish
6095
6128 - (int)startRtmpStreamWithoutTranscoding:(NSString* _Nonnull)url NS_SWIFT_NAME(startRtmpStreamWithoutTranscoding(_:));
6129
6164 - (int)startRtmpStreamWithTranscoding:(NSString* _Nonnull)url transcoding:(AgoraLiveTranscoding* _Nullable)transcoding NS_SWIFT_NAME(startRtmpStream(withTranscoding:transcoding:));
6165
6182 - (int)updateRtmpTranscoding:(AgoraLiveTranscoding* _Nullable)transcoding NS_SWIFT_NAME(updateRtmpTranscoding(_:));
6183
6204 - (int)stopRtmpStream:(NSString* _Nonnull)url NS_SWIFT_NAME(stopRtmpStream(_:));
6205
6206 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
6207 #pragma mark Screen Capture
6208
6222 - (int)startScreenCapture:(AgoraVideoSourceType)sourceType config:(AgoraScreenCaptureConfiguration * _Nullable)config NS_SWIFT_NAME(startScreenCapture(_:config:));
6223
6239 - (int)stopScreenCapture:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopScreenCapture(_:));
6240
6279 - (int)startScreenCaptureByDisplayId:(UInt32)displayId
6280 regionRect:(CGRect)regionRect
6281 captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams NS_SWIFT_NAME(startScreenCapture(byDisplayId:regionRect:captureParams:));
6282
6323 - (int)startScreenCaptureByWindowId:(UInt32)windowId
6324 regionRect:(CGRect)regionRect
6325 captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams NS_SWIFT_NAME(startScreenCapture(byWindowId:regionRect:captureParams:));
6326
6339 - (int)updateScreenCaptureRegion:(CGRect)rect NS_SWIFT_NAME(updateScreenCaptureRegion(_:));
6340
6358 - (int)updateScreenCaptureParameters:(AgoraScreenCaptureParameters * _Nonnull)captureParams NS_SWIFT_NAME(updateScreenCaptureParameters(_:));
6359
6390 - (NSArray<AgoraScreenCaptureSourceInfo*>* _Nullable)getScreenCaptureSourcesWithThumbSize:(NSSize)thumbSize iconSize:(NSSize)iconSize includeScreen:(BOOL)includeScreen NS_SWIFT_NAME(getScreenCaptureSources(withThumbSize:iconSize:includeScreen:));
6391
6392 #endif
6393
6410 - (int)setScreenCaptureScenario:(AgoraScreenScenarioType)scenarioType NS_SWIFT_NAME(setScreenCaptureScenario(_:));
6411
6429 - (int)stopScreenCapture NS_SWIFT_NAME(stopScreenCapture());
6430
6431 #if TARGET_OS_IPHONE
6432
6475 - (int)startScreenCapture:(AgoraScreenCaptureParameters2* _Nullable)parameters NS_SWIFT_NAME(startScreenCapture(_:));
6476
6486 - (int)updateScreenCapture:(AgoraScreenCaptureParameters2* _Nullable)parameters NS_SWIFT_NAME(updateScreenCapture(_:));
6487
6507 - (AgoraScreenCaptureFrameRateCapability)queryScreenCaptureCapability NS_SWIFT_NAME(queryScreenCaptureCapability());
6508
6523 - (NSArray<AgoraFocalLengthInfo *>* _Nullable)queryCameraFocalLengthCapability NS_SWIFT_NAME(queryCameraFocalLengthCapability());
6524
6525 #pragma mark Camera Control
6526
6538 - (BOOL)isCameraZoomSupported NS_SWIFT_NAME(isCameraZoomSupported());
6539
6550 - (CGFloat)cameraMaxZoomFactor NS_SWIFT_NAME(cameraMaxZoomFactor());
6551
6577 - (CGFloat)setCameraZoomFactor:(CGFloat)zoomFactor NS_SWIFT_NAME(setCameraZoomFactor(_:));
6578
6590 - (BOOL)isCameraFocusPositionInPreviewSupported NS_SWIFT_NAME(isCameraFocusPositionInPreviewSupported());
6591
6609 - (BOOL)setCameraFocusPositionInPreview:(CGPoint)position NS_SWIFT_NAME(setCameraFocusPositionInPreview(_:));
6610
6622 - (BOOL)isCameraExposurePositionSupported NS_SWIFT_NAME(isCameraExposurePositionSupported());
6623
6641 - (BOOL)setCameraExposurePosition:(CGPoint)positionInView NS_SWIFT_NAME(setCameraExposurePosition(_:));
6642
6661 - (BOOL)isCameraExposureSupported NS_SWIFT_NAME(isCameraExposureSupported());
6662
6694 - (CGFloat)setCameraExposureFactor:(CGFloat)exposureFactor NS_SWIFT_NAME(setCameraExposureFactor(_:));
6695
6713 - (BOOL)isCameraTorchSupported NS_SWIFT_NAME(isCameraTorchSupported());
6714
6731 - (BOOL)setCameraTorchOn:(BOOL)isOn NS_SWIFT_NAME(setCameraTorchOn(_:));
6732
6744 - (BOOL)isCameraAutoFocusFaceModeSupported NS_SWIFT_NAME(isCameraAutoFocusFaceModeSupported());
6745
6763 - (BOOL)setCameraAutoFocusFaceModeEnabled:(BOOL)enable NS_SWIFT_NAME(setCameraAutoFocusFaceModeEnabled(_:));
6764
6776 - (BOOL)isCameraAutoExposureFaceModeSupported NS_SWIFT_NAME(isCameraAutoExposureFaceModeSupported());
6777
6787 - (BOOL)setCameraAutoExposureFaceModeEnabled:(BOOL)enable NS_SWIFT_NAME(setCameraAutoExposureFaceModeEnabled(_:));
6788
6808 - (int)switchCamera NS_SWIFT_NAME(switchCamera());
6809
6851 - (int)enableMultiCamera:(BOOL)enabled config:(AgoraCameraCapturerConfiguration* _Nullable)config NS_SWIFT_NAME(enableMultiCamera(_:config:));
6852
6878 - (int) setCameraStabilizationMode:(AgoraCameraStabilizationMode)mode NS_SWIFT_NAME(setCameraStabilizationMode(_:));
6879 #endif
6880
6894 - (BOOL)isCameraCenterStageSupported NS_SWIFT_NAME(isCameraCenterStageSupported());
6895
6932 - (int)enableCameraCenterStage:(BOOL)enabled NS_SWIFT_NAME(enableCameraCenterStage(_:));
6933
6952 - (int)setCameraCapturerConfiguration:(AgoraCameraCapturerConfiguration * _Nullable)config NS_SWIFT_NAME(setCameraCapturerConfiguration(_:));
6953
6977 - (int)startCameraCapture:(AgoraVideoSourceType)sourceType config:(AgoraCameraCapturerConfiguration * _Nullable)config NS_SWIFT_NAME(startCameraCapture(_:config:));
6978
6999 - (int)stopCameraCapture:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopCameraCapture(_:));
7000
7001 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
7002 #pragma mark macOS Device
7003
7016 - (void)monitorDeviceChange:(BOOL)enabled NS_SWIFT_NAME(monitorDeviceChange(_:));
7017
7034 - (NSArray<AgoraRtcDeviceInfo *> * _Nullable)enumerateDevices:(AgoraMediaDeviceType)type NS_SWIFT_NAME(enumerateDevices(_:));
7035
7050 - (AgoraRtcDeviceInfo * _Nullable)getDeviceInfo:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceInfo(_:));
7051
7064 - (int)setDevice:(AgoraMediaDeviceType)type deviceId:(NSString * _Nonnull)deviceId NS_SWIFT_NAME(setDevice(_:deviceId:));
7065
7076 - (AgoraRtcDeviceInfo* _Nullable)getDefaultAudioDevice:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDefaultAudioDevice(_:));
7077
7088 - (int)getDeviceVolume:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceVolume(_:));
7089
7106 - (int)setDeviceVolume:(AgoraMediaDeviceType)type volume:(int)volume NS_SWIFT_NAME(setDeviceVolume(_:volume:));
7107
7135 - (int)startAudioDeviceLoopbackTest:(int)indicationInterval NS_SWIFT_NAME(startAudioDeviceLoopbackTest(_:));
7136
7150 - (int)stopAudioDeviceLoopbackTest NS_SWIFT_NAME(stopAudioDeviceLoopbackTest());
7151
7167 - (int)followSystemPlaybackDevice:(BOOL)enable NS_SWIFT_NAME(followSystemPlaybackDevice(_:));
7168
7184 - (int)followSystemRecordingDevice:(BOOL)enable NS_SWIFT_NAME(followSystemRecordingDevice(_:));
7185
7194 - (int)startCaptureDeviceTest:(NSView * _Nonnull)view NS_SWIFT_NAME(startCaptureDeviceTest(_:));
7195
7202 - (int)stopCaptureDeviceTest NS_SWIFT_NAME(stopCaptureDeviceTest());
7203 #endif
7204
7205 #pragma mark Face Detection
7206
7207 #if TARGET_OS_IPHONE
7208
7229 - (int)enableFaceDetection:(BOOL)enable NS_SWIFT_NAME(enableFaceDetection(_:));
7230 #endif
7231
7232 #pragma mark Watermark
7233
7260 - (int)addVideoWatermark:(AgoraImage * _Nonnull)watermark NS_SWIFT_NAME(addVideoWatermark(_:)) __deprecated_msg("use addVideoWatermarkWithConfig:config instead.");
7261
7310 - (int)addVideoWatermark:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options NS_SWIFT_NAME(addVideoWatermark(_:options:)) __deprecated_msg("use addVideoWatermarkWithConfig:config instead.");
7311
7327 - (int)addVideoWatermarkWithConfig:(WatermarkConfig* _Nonnull)config NS_SWIFT_NAME(addVideoWatermark(_:));
7328
7344 - (int)removeVideoWatermark:(NSString* _Nonnull)id NS_SWIFT_NAME(removeVideoWatermark(_:));
7345
7353 - (int)clearVideoWatermarks NS_SWIFT_NAME(clearVideoWatermarks());
7354
7355 #pragma mark String UID
7356
7405 - (int)registerLocalUserAccount:(NSString* _Nonnull)userAccount appId:(NSString* _Nonnull)appId NS_SWIFT_NAME(registerLocalUserAccount(_:appId:));
7406
7497 - (int)joinChannelByToken:(NSString * _Nullable)token
7498 channelId:(NSString * _Nonnull)channelId
7499 userAccount:(NSString * _Nonnull)userAccount
7500 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:userAccount:joinSuccess:));
7501
7595 - (int)joinChannelByToken:(NSString * _Nullable)token
7596 channelId:(NSString * _Nonnull)channelId
7597 userAccount:(NSString * _Nonnull)userAccount
7598 mediaOptions:(AgoraRtcChannelMediaOptions * _Nonnull)mediaOptions
7599 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:userAccount:mediaOptions:joinSuccess:));
7600
7621 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccount:(NSString* _Nonnull)userAccount withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccount:withError:));
7622
7643 - (AgoraUserInfo* _Nullable)getUserInfoByUid:(NSUInteger)uid withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUid:withError:));
7644
7645 #pragma mark Custom Audio PCM Frame
7646
7664 - (BOOL)setAudioFrameDelegate:(id<AgoraAudioFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setAudioFrameDelegate(_:));
7665
7666 #pragma mark Custom Video Frame
7667
7697 - (BOOL)setVideoFrameDelegate:(id<AgoraVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setVideoFrameDelegate(_:));
7698
7699 #pragma mark Encoded Video Frame
7700
7717 - (BOOL)setEncodedVideoFrameDelegate:(id<AgoraEncodedVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setEncodedVideoFrameDelegate(_:));
7718
7719 #pragma mark Custom Face Info
7720
7747 - (BOOL)setFaceInfoDelegate:(id<AgoraFaceInfoDelegate> _Nullable)delegate NS_SWIFT_NAME(setFaceInfoDelegate(_:));
7748
7749 #pragma mark Custom Media Metadata
7750
7771 - (BOOL)setMediaMetadataDataSource:(id<AgoraMediaMetadataDataSource> _Nullable)metadataDataSource withType:(AgoraMetadataType)type NS_SWIFT_NAME(setMediaMetadataDataSource(_:with:));
7772
7793 - (BOOL)setMediaMetadataDelegate:(id<AgoraMediaMetadataDelegate> _Nullable)metadataDelegate withType:(AgoraMetadataType)type NS_SWIFT_NAME(setMediaMetadataDelegate(_:with:));
7794
7795 #pragma mark Miscellaneous Methods
7796
7802 + (NSString * _Nonnull)getSdkVersion NS_SWIFT_NAME(getSdkVersion());
7803
7812 + (NSString* _Nonnull)getErrorDescription:(NSInteger)error NS_SWIFT_NAME(getErrorDescription(_:));
7813
7824 - (void * _Nullable)getNativeHandle NS_SWIFT_NAME(getNativeHandle());
7825
7842 - (int)setLogFile:(NSString * _Nonnull)filePath NS_SWIFT_NAME(setLogFile(_:));
7843
7861 - (int)setLogFilter:(NSUInteger)filter NS_SWIFT_NAME(setLogFilter(_:));
7862
7896 - (int)setLogFileSize:(NSUInteger)fileSizeInKBytes NS_SWIFT_NAME(setLogFileSize(_:));
7897
7905 - (NSString * _Nullable)uploadLogFile NS_SWIFT_NAME(uploadLogFile());
7906
7917 - (int)writeLog:(AgoraLogLevel)level content:(NSString * _Nonnull)content NS_SWIFT_NAME(writeLog(_:content:));
7918
7931 - (NSString * _Nullable)getCallId NS_SWIFT_NAME(getCallId());
7932
7949 - (int)rate:(NSString * _Nonnull)callId
7950 rating:(NSInteger)rating
7951 description:(NSString * _Nullable)description NS_SWIFT_NAME(rate(_:rating:description:));
7952
7971 - (int)complain:(NSString * _Nonnull)callId
7972 description:(NSString * _Nullable)description NS_SWIFT_NAME(complain(_:description:));
7973
7988 - (int)enableMainQueueDispatch:(BOOL)enabled NS_SWIFT_NAME(enableMainQueueDispatch(_:));
7989
8015 - (int)startLastmileProbeTest:(AgoraLastmileProbeConfig *_Nullable)config NS_SWIFT_NAME(startLastmileProbeTest(_:));
8016
8024 - (int)stopLastmileProbeTest NS_SWIFT_NAME(stopLastmileProbeTest());
8025
8036 - (int)setParameters:(NSString * _Nonnull)options NS_SWIFT_NAME(setParameters(_:));
8037
8043 - (NSString * _Nullable)getParameter:(NSString * _Nonnull)parameter
8044 args:(NSString * _Nullable)args NS_SWIFT_NAME(getParameter(_:args:));
8045
8058 - (uint64_t)getNtpWallTimeInMs;
8059
8060 #pragma mark MediaPlayer
8061
8077 - (id<AgoraRtcMediaPlayerProtocol>_Nullable)createMediaPlayerWithDelegate:(id<AgoraRtcMediaPlayerDelegate>_Nullable)delegate NS_SWIFT_NAME(createMediaPlayer(with:));
8078
8093 - (id<AgoraRtcMediaPlayerCacheManagerProtocol> _Nullable)createMediaPlayerCacheManager NS_SWIFT_NAME(createMediaPlayerCacheManager());
8094
8104 - (int)destroyMediaPlayer:(id<AgoraRtcMediaPlayerProtocol>_Nullable)mediaPlayer NS_SWIFT_NAME(destroyMediaPlayer(_:));
8105
8111 - (id<AgoraRtcMediaPlayerProtocol> _Nullable)getMediaPlayer:(int)mediaPlayerId NS_SWIFT_NAME(getMediaPlayer(_:));
8112
8113 #pragma mark rhythm player
8114
8150 - (int)startRhythmPlayer:(NSString * _Nonnull)sound1 sound2:(NSString * _Nonnull)sound2 config:(AgoraRhythmPlayerConfig * _Nullable)config NS_SWIFT_NAME(startRhythmPlayer(_:sound2:config:));
8151
8163 - (int)stopRhythmPlayer NS_SWIFT_NAME(stopRhythmPlayer());
8164
8190 - (int)configRhythmPlayer:(AgoraRhythmPlayerConfig * _Nullable)config NS_SWIFT_NAME(configRhythmPlayer(_:));
8191
8192 #pragma mark Streaming Kit
8193
8210 - (int)setDirectCdnStreamingAudioConfiguration:(AgoraAudioProfile)profile NS_SWIFT_NAME(setDirectCdnStreamingAudioConfiguration(_:));
8211
8236 - (int)setDirectCdnStreamingVideoConfiguration:(AgoraVideoEncoderConfiguration * _Nonnull)config NS_SWIFT_NAME(setDirectCdnStreamingVideoConfiguration(_:));
8237
8276 - (int)startDirectCdnStreaming:(id<AgoraDirectCdnStreamingEventDelegate> _Nonnull)delegate
8277 publishUrl:(NSString * _Nonnull)publishUrl
8278 mediaOptions:(AgoraDirectCdnStreamingMediaOptions * _Nonnull)options NS_SWIFT_NAME(startDirectCdnStreaming(_:publishUrl:mediaOptions:));
8279
8289 - (int)stopDirectCdnStreaming NS_SWIFT_NAME(stopDirectCdnStreaming());
8290
8302 - (int)updateDirectCdnStreamingMediaOptions:(AgoraDirectCdnStreamingMediaOptions * _Nonnull)options NS_SWIFT_NAME(updateDirectCdnStreamingMediaOptions(_:));
8303
8321 - (int)setAdvancedAudioOptions:(AgoraAdvancedAudioOptions * _Nonnull)options NS_SWIFT_NAME(setAdvancedAudioOptions(_:));
8322
8334 - (int)sendCustomReportMessage:(NSString * _Nullable)messageId
8335 category:(NSString * _Nullable)category
8336 event:(NSString * _Nullable)event
8337 label:(NSString * _Nullable)label
8338 value:(NSInteger)value NS_SWIFT_NAME(sendCustomReportMessage(_:category:event:label:value:));
8339
8352 - (int)setLogLevel:(AgoraLogLevel)level NS_SWIFT_NAME(setLogLevel(_:));
8353
8373 - (int)setLocalAccessPoint:(AgoraLocalAccessPointConfiguration* _Nonnull)config NS_SWIFT_NAME(setLocalAccessPoint(withConfig:));
8374
8409 - (int)setCloudProxy:(AgoraCloudProxyType)proxyType NS_SWIFT_NAME(setCloudProxy(_:));
8410
8440 - (NSInteger)takeSnapshot:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshot(_:filePath:));
8441
8466 - (NSInteger)takeSnapshotWithConfig:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotWithConfig(_:config:));
8467
8497 - (int)enableContentInspect:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config NS_SWIFT_NAME(enableContentInspect(_:config:));
8498
8519 - (int)setAVSyncSource:(NSString* _Nonnull)channelId uid:(NSUInteger)uid NS_SWIFT_NAME(setAVSyncSource(_:uid:));
8520
8530 - (int)sendAudioMetadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadata(_:));
8551 - (int)enableVideoImageSource:(BOOL)enable
8552 options:(AgoraImageTrackOptions *_Nullable)options NS_SWIFT_NAME(enableVideoImageSource(_:options:));
8553
8574 - (int)getNetworkType NS_SWIFT_NAME(getNetworkType());
8575
8597 - (AgoraMediaRecorder * _Nullable)createMediaRecorder:(AgoraRecorderStreamInfo * _Nonnull)info NS_SWIFT_NAME(createMediaRecorder(withInfo:));
8598
8614 - (int)destroyMediaRecorder:(AgoraMediaRecorder * _Nullable)mediaRecorder;
8615
8616 #pragma mark Channel Transcoder
8617
8622 - (id<AgoraH265TranscoderProtocol>_Nullable)getH265Transcoder NS_SWIFT_NAME (getH265Transcoder());
8623
8624 #pragma mark Deprecated Methods
8625
8637 - (int)setLocalVideoMirrorMode:(AgoraVideoMirrorMode)mode NS_SWIFT_NAME(setLocalVideoMirrorMode(_:)) __deprecated;
8638
8660 - (int)enableWebSdkInteroperability:(BOOL)enabled NS_SWIFT_NAME(enableWebSdkInteroperability(_:)) __deprecated;
8661
8673 - (void)audioVolumeIndicationBlock:(void(^ _Nullable)(NSArray * _Nonnull speakers, NSInteger totalVolume))audioVolumeIndicationBlock NS_SWIFT_NAME(audioVolumeIndicationBlock(_:)) __deprecated_msg("use delegate instead.");
8674
8683 - (void)firstLocalVideoFrameBlock:(void(^ _Nullable)(NSInteger width, NSInteger height, NSInteger elapsed))firstLocalVideoFrameBlock NS_SWIFT_NAME(firstLocalVideoFrameBlock(_:)) __deprecated_msg("use delegate instead.");
8684
8695 - (void)firstRemoteVideoDecodedBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger width, NSInteger height, NSInteger elapsed))firstRemoteVideoDecodedBlock NS_SWIFT_NAME(firstRemoteVideoDecodedBlock(_:)) __deprecated_msg("use delegate instead.");
8696
8706 - (void)firstRemoteVideoFrameBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger width, NSInteger height, NSInteger elapsed))firstRemoteVideoFrameBlock NS_SWIFT_NAME(firstRemoteVideoFrameBlock(_:)) __deprecated_msg("use delegate instead.");
8707
8717 - (void)userJoinedBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger elapsed))userJoinedBlock NS_SWIFT_NAME(userJoinedBlock(_:)) __deprecated_msg("use delegate instead.");
8718
8727 - (void)userOfflineBlock:(void(^ _Nullable)(NSUInteger uid))userOfflineBlock NS_SWIFT_NAME(userOfflineBlock(_:)) __deprecated_msg("use delegate instead.");
8728
8738 - (void)userMuteAudioBlock:(void(^ _Nullable)(NSUInteger uid, BOOL muted))userMuteAudioBlock NS_SWIFT_NAME(userMuteAudioBlock(_:)) __deprecated_msg("use delegate instead.");
8739
8754 - (void)userMuteVideoBlock:(void(^ _Nullable)(NSUInteger uid, BOOL muted))userMuteVideoBlock NS_SWIFT_NAME(userMuteVideoBlock(_:)) __deprecated_msg("use delegate instead.");
8755
8763 - (void)localVideoStatBlock:(void(^ _Nullable)(NSInteger sentBitrate, NSInteger sentFrameRate))localVideoStatBlock NS_SWIFT_NAME(localVideoStatBlock(_:)) __deprecated_msg("use delegate instead.");
8764
8774 - (void)remoteVideoStatBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger delay, NSInteger receivedBitrate, NSInteger receivedFrameRate))remoteVideoStatBlock NS_SWIFT_NAME(remoteVideoStatBlock(_:)) __deprecated_msg("use delegate instead.");
8775
8779 - (void)cameraReadyBlock:(void(^ _Nullable)(void))cameraReadyBlock NS_SWIFT_NAME(cameraReadyBlock(_:)) __deprecated_msg("use delegate instead.");
8780
8784 - (void)connectionLostBlock:(void(^ _Nullable)(void))connectionLostBlock NS_SWIFT_NAME(connectionLostBlock(_:)) __deprecated_msg("use delegate instead.");
8785
8796 - (void)rejoinChannelSuccessBlock:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))rejoinChannelSuccessBlock NS_SWIFT_NAME(rejoinChannelSuccessBlock(_:)) __deprecated_msg("use delegate instead.");
8797
8804 - (void)rtcStatsBlock:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))rtcStatsBlock NS_SWIFT_NAME(rtcStatsBlock(_:)) __deprecated_msg("use delegate instead.");
8805
8815 - (void)audioQualityBlock:(void(^ _Nullable)(NSUInteger uid, AgoraNetworkQuality quality, NSUInteger delay, NSUInteger lost))audioQualityBlock NS_SWIFT_NAME(audioQualityBlock(_:)) __deprecated_msg("use delegate instead.");
8816
8825 - (void)networkQualityBlock:(void(^ _Nullable)(NSUInteger uid, AgoraNetworkQuality txQuality, AgoraNetworkQuality rxQuality))networkQualityBlock NS_SWIFT_NAME(networkQualityBlock(_:)) __deprecated_msg("use delegate instead.");
8826
8833 - (void)lastmileQualityBlock:(void(^ _Nullable)(AgoraNetworkQuality quality))lastmileQualityBlock NS_SWIFT_NAME(lastmileQualityBlock(_:)) __deprecated_msg("use delegate instead.");
8834
8838 - (void)mediaEngineEventBlock:(void(^ _Nullable)(NSInteger code))mediaEngineEventBlock NS_SWIFT_NAME(mediaEngineEventBlock(_:)) __deprecated_msg("use delegate instead.");
8839
8849 - (int)pauseAudio __deprecated_msg("use disableAudio instead.");
8850
8860 - (int)resumeAudio __deprecated_msg("use enableAudio instead.");
8861
8868 + (instancetype _Nonnull)sharedEngineWithAppId:(NSString * _Nonnull)AppId
8869 error:(void(^ _Nullable)(AgoraErrorCode errorCode))errorBlock NS_SWIFT_NAME(sharedEngine(withAppId:error:)) __deprecated_msg("use sharedEngineWithAppId:delegate: instead.");
8870
8876 - (int)setHighQualityAudioParametersWithFullband:(BOOL)fullband
8877 stereo:(BOOL)stereo
8878 fullBitrate:(BOOL)fullBitrate NS_SWIFT_NAME(setHighQualityAudioParametersWithFullband(_:stereo:fullBitrate:)) __deprecated_msg("use setAudioProfile:scenario: instead.");
8879
8880
8909 - (int)setAudioProfile:(AgoraAudioProfile)profile scenario:(AgoraAudioScenario)scenario NS_SWIFT_NAME(setAudioProfile(_:scenario:)) __deprecated_msg("use setAudioProfile: instead.");
8910
8917 - (NSString * _Nullable)getDeviceId:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceId(_:)) __deprecated_msg("use getDeviceInfo: instead.");
8918
8941 - (int)setExternalAudioSource:(BOOL)enabled
8942 sampleRate:(NSInteger)sampleRate
8943 channels:(NSInteger)channels NS_SWIFT_NAME(setExternalAudioSource(_:sampleRate:channels:)) __deprecated_msg("use createCustomAudioTrack:config: instead.");
8944
8972 - (int)setExternalAudioSource:(BOOL)enabled
8973 sampleRate:(NSInteger)sampleRate
8974 channels:(NSInteger)channels
8975 localPlayback:(BOOL)localPlayback
8976 publish:(BOOL)publish NS_SWIFT_NAME(setExternalAudioSource(_:sampleRate:channels:localPlayback:publish:)) __deprecated_msg("use createCustomAudioTrack:config: instead.");
8977
8978 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
8979
8988 - (int)setSpeakerphoneVolume:(NSUInteger)volume NS_SWIFT_NAME(setSpeakerphoneVolume(_:)) __deprecated_msg("use setDeviceVolume:volume: instead.");
8989
8990 - (int)startScreenCapture:(NSUInteger)windowId
8991 withCaptureFreq:(NSInteger)captureFreq
8992 bitRate:(NSInteger)bitRate
8993 andRect:(CGRect)rect NS_SWIFT_NAME(startScreenCapture(_:withCaptureFreq:bitRate:andRect:)) __deprecated_msg("use startScreenCaptureByWindowId:regionRect:captureParams: instead.");
8994 #endif
8995
9001 + (NSString * _Nonnull)getMediaEngineVersion NS_SWIFT_NAME(getMediaEngineVersion()) __deprecated;
9002
9003
9022 - (int)setVideoResolution:(CGSize)size andFrameRate:(NSInteger)frameRate bitrate:(NSInteger)bitrate NS_SWIFT_NAME(setVideoResolution(_:andFrameRate:bitrate:)) __deprecated_msg("use setVideoEncoderConfiguration: instead.");
9023
9032 - (void)leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelBlock(_:)) __deprecated_msg("use delegate instead.");
9033
9050 - (int)setLocalRenderMode:(NSUInteger)uid
9051 mode:(AgoraVideoRenderMode)mode NS_SWIFT_NAME(setLocalRenderMode(_:mode:)) __deprecated;
9052
9063 - (int)enableExternalAudioSourceLocalPlayback:(BOOL)enable NS_SWIFT_NAME(enableExternalAudioSourceLocalPlayback(_:)) __deprecated;;
9064
9065 - (int)startMultipleVideoStreams:(VIEW_CLASS * _Nonnull)view screen:(VIEW_CLASS * _Nonnull)screenView remotes:(NSArray * _Nullable)remoteViews NS_SWIFT_NAME(startMultipleVideoStreams(_:screen:remotes:)) __deprecated;;
9066
9072 - (void)addDelegate:(id<AgoraRtcEngineDelegate> _Nonnull)delegate NS_SWIFT_NAME(addDelegate(_:));
9073
9079 - (void)removeDelegate:(id<AgoraRtcEngineDelegate> _Nonnull)delegate NS_SWIFT_NAME(removeDelegate(_:));
9080
9081 @end
-[AgoraRtcEngineKit enableAudio]
int enableAudio()
Enables the audio module.
AgoraAudioTrackType
AgoraAudioTrackType
The type of the audio track.
Definition: AgoraEnumerates.h:5175
AgoraRtcEngineKit::delegate
id< AgoraRtcEngineDelegate > _Nullable delegate
Sets and retrieves AgoraRtcEngineDelegate.
Definition: AgoraRtcEngineKit.h:58
AgoraRecorderStreamInfo
Information about the audio and video streams to be recorded.
Definition: AgoraObjects.h:3836
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:48
AgoraRtcMediaPlayerCacheManagerProtocol.h
-[AgoraRtcEngineKit getNetworkType]
int getNetworkType()
Gets the type of the local network connection.
-[AgoraRtcEngineKit queryDeviceScore]
int queryDeviceScore()
Queries device score.
-[AgoraRtcEngineKit enableInstantMediaRendering]
int enableInstantMediaRendering()
Enables audio and video frame instant rendering.
-[AgoraRtcEngineKit cameraMaxZoomFactor]
CGFloat cameraMaxZoomFactor()
Gets the maximum zoom ratio supported by the camera.
-[AgoraRtcEngineKit stopChannelMediaRelay]
int stopChannelMediaRelay()
Stops the media stream relay. Once the relay stops, the host quits all the target channels.
AgoraMediaMetadataDelegate.h
-[AgoraRtcEngineKit getConnectionState]
AgoraConnectionState getConnectionState()
Gets the current connection state of the SDK.
AgoraEncodedVideoTrackOptions
Definition: AgoraObjects.h:345
AgoraRtcChannelMediaOptions
The channel media options.
Definition: AgoraObjects.h:383
AgoraAudioScenario
AgoraAudioScenario
The audio scenarios.
Definition: AgoraEnumerates.h:1824
AgoraEarMonitoringFilterType
AgoraEarMonitoringFilterType
The audio filter types of in-ear monitoring.
Definition: AgoraEnumerates.h:4627
AgoraRhythmPlayerConfig
The metronome configuration.
Definition: AgoraObjects.h:3980
AgoraBeautyOptions
Image enhancement options.
Definition: AgoraObjects.h:2957
AgoraVideoSubscriptionOptions
Video subscription options.
Definition: AgoraObjects.h:3815
AgoraMediaRecorder
Definition: AgoraMediaRecorder.h:14
AgoraRtcMediaPlayerProtocol.h
AgoraAudioTrackConfig
The configuration of custom audio tracks.
Definition: AgoraObjects.h:4370
AgoraClientRole
AgoraClientRole
The user role in the interactive live streaming.
Definition: AgoraEnumerates.h:711
AgoraScreenCaptureParameters2
Screen sharing configurations.
Definition: AgoraObjects.h:3489
AgoraHeadphoneEQPreset
AgoraHeadphoneEQPreset
Preset headphone equalizer types.
Definition: AgoraEnumerates.h:2284
AgoraVideoModule
AgoraVideoModule
Definition: AgoraEnumerates.h:5330
AgoraVideoFrameDelegate.h
AUDIO_AINS_MODE
AUDIO_AINS_MODE
AI noise suppression modes.
Definition: AgoraEnumerates.h:5197
AgoraRdtStreamType
AgoraRdtStreamType
Reliable Data Transmission Tunnel message stream type.
Definition: AgoraEnumerates.h:5416
-[AgoraRtcEngineKit startMediaRenderingTracing]
int startMediaRenderingTracing()
Enables tracing the video frame rendering process.
-[AgoraRtcEngineKit switchCamera]
int switchCamera()
Switches between front and rear cameras.
AgoraFeatureType
AgoraFeatureType
The type of the advanced feature.
Definition: AgoraEnumerates.h:5319
AgoraFaceShapeAreaOptions
Filter effect options.
Definition: AgoraObjects.h:2994
AgoraCameraStabilizationMode
AgoraCameraStabilizationMode
Camera stabilization modes.
Definition: AgoraEnumerates.h:3665
AgoraFaceInfoDelegate.h
AgoraVideoFrame
The external video frame.
Definition: AgoraObjects.h:2158
AgoraSimulcastStreamConfig
The configuration of the low-quality video stream.
Definition: AgoraObjects.h:3568
AgoraLocalAudioMixerConfiguration
The configurations for mixing the local audio.
Definition: AgoraObjects.h:3281
AgoraVoiceConversionPreset
AgoraVoiceConversionPreset
The options for SDK preset voice conversion effects.
Definition: AgoraEnumerates.h:2207
AgoraScreenCaptureParameters
Screen sharing configurations.
Definition: AgoraObjects.h:3327
AgoraAudioRawFrameOperationMode
AgoraAudioRawFrameOperationMode
The use mode of the audio data.
Definition: AgoraEnumerates.h:1915
+[AgoraRtcEngineKit destroy]
void destroy()
Releases the AgoraRtcEngineKit instance.
AgoraMediaRecorder.h
AgoraSegmentationProperty
Processing properties for background images.
Definition: AgoraObjects.h:3162
AgoraSimulcastConfig
Configure video streams of different quality levels.
Definition: AgoraObjects.h:3618
AgoraVoiceAITunerType
AgoraVoiceAITunerType
Voice AI tuner sound types.
Definition: AgoraEnumerates.h:2302
AgoraContentInspectConfig
Screenshot and upload configuration.
Definition: AgoraObjects.h:3745
AgoraAudioEncodedFrameDelegateConfig
Observer settings for the encoded audio.
Definition: AgoraObjects.h:3708
AgoraDirectCdnStreamingMediaOptions
The media setting options for the host.
Definition: AgoraObjects.h:297
AgoraH265TranscoderProtocol.h
AgoraAudioProfile
AgoraAudioProfile
The audio profile.
Definition: AgoraEnumerates.h:1780
AgoraVideoDenoiserOptions
Video noise reduction options.
Definition: AgoraObjects.h:3058
AgoraLastmileProbeConfig
Configurations of the last-mile network test.
Definition: AgoraObjects.h:742
-[AgoraRtcEngineKit stopLocalVideoTranscoder]
int stopLocalVideoTranscoder()
Stops the local video mixing.
AgoraFaceShapeArea
AgoraFaceShapeArea
Chooses the specific facial areas that need to be adjusted.
Definition: AgoraEnumerates.h:2778
-[AgoraRtcEngineKit stopLastmileProbeTest]
int stopLastmileProbeTest()
Stops the last mile network probe test.
WatermarkOptions
Watermark image configurations.
Definition: AgoraObjects.h:1689
AgoraVideoSourceType
AgoraVideoSourceType
The type of the video source.
Definition: AgoraEnumerates.h:4109
-[AgoraRtcEngineKit createMediaPlayerCacheManager]
id< AgoraRtcMediaPlayerCacheManagerProtocol > _Nullable createMediaPlayerCacheManager()
Creates one AgoraRtcMediaPlayerCacheManagerProtocol instance.
-[AgoraRtcEngineKit stopScreenCapture]
int stopScreenCapture()
Stops screen capture.
-[AgoraRtcEngineKit getCurrentMonotonicTimeInMs]
int64_t getCurrentMonotonicTimeInMs()
Gets the current Monotonic Time of the SDK.
-[AgoraRtcEngineKit stopDirectCdnStreaming]
int stopDirectCdnStreaming()
Stops pushing media streams to the CDN directly.
AgoraQoEPreferenceType
AgoraQoEPreferenceType
Definition: AgoraEnumerates.h:3954
VIEW_CLASS
UIView VIEW_CLASS
Definition: AgoraObjects.h:14
AgoraChannelProfile
AgoraChannelProfile
The channel profile.
Definition: AgoraEnumerates.h:680
-[AgoraRtcEngineKit uploadLogFile]
NSString *_Nullable uploadLogFile()
-[AgoraRtcEngineKit pauseAllChannelMediaRelay]
int pauseAllChannelMediaRelay()
Pauses the media stream relay to all target channels.
-[AgoraRtcEngineKit stopPreview]
int stopPreview()
AgoraLeaveChannelOptions
The options for leaving a channel.
Definition: AgoraObjects.h:2567
AgoraDataStreamConfig
The configurations for the data stream.
Definition: AgoraObjects.h:2834
AgoraMediaRecorderDelegate.h
-[AgoraRtcEngineKit stopLocalAudioMixer]
int stopLocalAudioMixer()
Stops the local audio mixing.
-[AgoraRtcEngineKit getH265Transcoder]
id< AgoraH265TranscoderProtocol >_Nullable getH265Transcoder()
AgoraUserInfo
The information of the user.
Definition: AgoraObjects.h:2738
AgoraRtcAudioSpectrumDelegate.h
AgoraVoiceBeautifierPreset
AgoraVoiceBeautifierPreset
The options for SDK preset voice beautifier effects.
Definition: AgoraEnumerates.h:2003
-[AgoraRtcEngineKit disableAudioSpectrumMonitor]
int disableAudioSpectrumMonitor()
Disables audio spectrum monitoring.
AgoraRtcEngineConfig
Configurations for the AgoraRtcEngineConfig instance.
Definition: AgoraObjects.h:2335
AgoraMediaMetadataDataSource.h
AgoraImageTrackOptions
Image configurations.
Definition: AgoraObjects.h:4044
AgoraVideoRenderMode
AgoraVideoRenderMode
Video display modes.
Definition: AgoraEnumerates.h:1256
AgoraAudioEncodedFrameDelegate.h
AgoraVideoEffectObject.h
AgoraEncryptionConfig
Built-in encryption configurations.
Definition: AgoraObjects.h:2704
AgoraAudioFrameDelegate.h
AgoraEncodedVideoFrameInfo
Information about externally encoded video frames.
Definition: AgoraObjects.h:3855
AgoraChannelMediaRelayConfiguration
Configuration of cross channel media relay.
Definition: AgoraObjects.h:2886
AgoraVideoStreamType
AgoraVideoStreamType
The type of video streams.
Definition: AgoraEnumerates.h:1193
-[AgoraRtcEngineKit stopPlaybackDeviceTest]
int stopPlaybackDeviceTest()
Stops the audio playback device test.
AgoraEchoTestConfiguration
The configuration of the audio and video call loop test.
Definition: AgoraObjects.h:4145
AgoraConnectionState
AgoraConnectionState
Connection states.
Definition: AgoraEnumerates.h:2555
AgoraHDRCapability
AgoraHDRCapability
Definition: AgoraEnumerates.h:5339
-[AgoraRtcEngineKit getCallId]
NSString *_Nullable getCallId()
Retrieves the call ID.
AgoraAdvancedAudioOptions
The advanced options for audio.
Definition: AgoraObjects.h:4032
AgoraScreenScenarioType
AgoraScreenScenarioType
The screen sharing scenario.
Definition: AgoraEnumerates.h:3978
AgoraEncodedVideoFrameDelegate.h
-[AgoraRtcEngineKit getFaceShapeBeautyOptions]
AgoraFaceShapeBeautyOptions *_Nullable getFaceShapeBeautyOptions()
Gets the beauty effect options.
-[AgoraRtcEngineKit resumeAllChannelMediaRelay]
int resumeAllChannelMediaRelay()
Resumes the media stream relay to all target channels.
AgoraObjects.h
AgoraLocalAccessPointConfiguration
Local Access Point configuration.
Definition: AgoraObjects.h:3941
AgoraConstants.h
-[AgoraRtcEngineKit disableAudio]
int disableAudio()
Disables the audio module.
-[AgoraRtcEngineKit stopRhythmPlayer]
int stopRhythmPlayer()
Disables the virtual metronome.
-[AgoraRtcEngineKit createCustomVideoTrack]
unsigned int createCustomVideoTrack()
Creates a custom video track.
-[AgoraRtcEngineKit disableVideo]
int disableVideo()
Disables the video module.
AgoraFaceShapeBeautyOptions
The facial enhancement style options.
Definition: AgoraObjects.h:3010
+[AgoraRtcEngineKit getSdkVersion]
NSString *_Nonnull getSdkVersion()
Gets the SDK version.
AgoraVirtualBackgroundSource
The custom background.
Definition: AgoraObjects.h:3120
AgoraRtcMediaPlayerDelegate.h
-[AgoraRtcEngineKit startPreview]
int startPreview()
Enables the local video preview.
AgoraSnapshotConfig
The snapshot configuration.
Definition: AgoraObjects.h:3773
AgoraLowlightEnhanceOptions
The low-light enhancement options.
Definition: AgoraObjects.h:3075
AgoraSimulcastStreamMode
AgoraSimulcastStreamMode
The mode in which the video stream is sent.
Definition: AgoraEnumerates.h:4197
__deprecated
#define __deprecated
Definition: AgoraBase.h:74
AgoraDirectCdnStreamingEventDelegate.h
AgoraExternalVideoSourceType
AgoraExternalVideoSourceType
The external video frame encoding type.
Definition: AgoraEnumerates.h:4183
-[AgoraRtcEngineKit getAudioTrackCount]
int getAudioTrackCount()
Gets the index of audio tracks of the current music file.
AgoraLocalTranscoderConfiguration
The configuration of the video mixing on the local client.
Definition: AgoraObjects.h:3302
AgoraRtcVideoCanvas
Attributes of the video canvas object.
Definition: AgoraObjects.h:663
AgoraRtcEngineDelegate.h
AgoraApplicationScenarioType
AgoraApplicationScenarioType
The video application scenarios.
Definition: AgoraEnumerates.h:3883
AgoraAudioRecordingConfiguration
Recording configurations.
Definition: AgoraObjects.h:3520
AgoraMetadataType
AgoraMetadataType
Metadata type of the observer. We only support video metadata for now.
Definition: AgoraEnumerates.h:3365
AgoraColorEnhanceOptions
The color enhancement options.
Definition: AgoraObjects.h:3092
-[AgoraRtcEngineKit getNtpWallTimeInMs]
uint64_t getNtpWallTimeInMs()
Gets the current NTP (Network Time Protocol) time.
AgoraClientRoleOptions
Setting of user role properties.
Definition: AgoraObjects.h:2754
AgoraMediaSourceType
AgoraMediaSourceType
Media source type.
Definition: AgoraEnumerates.h:4005
AgoraNetworkQuality
AgoraNetworkQuality
Network quality types.
Definition: AgoraEnumerates.h:1086
-[AgoraRtcEngineKit stopRecordingDeviceTest]
int stopRecordingDeviceTest()
Stops the audio capturing device test.
WatermarkConfig
Used to configure watermark-related information.
Definition: AgoraObjects.h:1758
-[AgoraRtcEngineKit queryCameraFocalLengthCapability]
NSArray< AgoraFocalLengthInfo * > *_Nullable queryCameraFocalLengthCapability()
Queries the focal length capability supported by the camera.
AgoraCameraCapturerConfiguration
The camera capturer preference.
Definition: AgoraObjects.h:2767
AgoraCloudProxyType
AgoraCloudProxyType
The cloud proxy type.
Definition: AgoraEnumerates.h:825
-[AgoraRtcEngineKit enableVideo]
int enableVideo()
Enables the video module.
AgoraScreenCaptureFrameRateCapability
AgoraScreenCaptureFrameRateCapability
The highest frame rate supported by the screen sharing device.
Definition: AgoraEnumerates.h:5156
AgoraExtensionInfo
Definition: AgoraObjects.h:4334
-[AgoraRtcEngineKit queryCodecCapability]
NSArray< AgoraVideoCodecCapInfo * > *_Nullable queryCodecCapability()
Queries the video codec capabilities of the SDK.
AgoraLogLevel
AgoraLogLevel
The output log level of the SDK.
Definition: AgoraEnumerates.h:3388
AgoraChannelStats
Statistics of a call session.
Definition: AgoraObjects.h:1234
-[AgoraRtcEngineKit queryScreenCaptureCapability]
AgoraScreenCaptureFrameRateCapability queryScreenCaptureCapability()
Queries the highest frame rate supported by the device during screen sharing.