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
3243 - (int)preloadEffect:(int)soundId
3244 filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(preloadEffect(_:filePath:));
3245
3270 - (int)preloadEffect:(int)soundId
3271 filePath:(NSString* _Nonnull)filePath
3272 startPos:(int)startPos NS_SWIFT_NAME(preloadEffect(_:filePath:startPos:));
3273
3322 - (int)playEffect:(int)soundId
3323 filePath:(NSString* _Nonnull)filePath
3324 loopCount:(NSInteger)loopCount
3325 pitch:(double)pitch
3326 pan:(double)pan
3327 gain:(NSInteger)gain NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:));
3328
3329
3379 - (int)playEffect:(int)soundId
3380 filePath:(NSString* _Nonnull)filePath
3381 loopCount:(NSInteger)loopCount
3382 pitch:(double)pitch
3383 pan:(double)pan
3384 gain:(NSInteger)gain
3385 startPos:(int)startPos NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:startPos:));
3386
3439 - (int)playEffect:(int)soundId
3440 filePath:(NSString* _Nonnull)filePath
3441 loopCount:(NSInteger)loopCount
3442 pitch:(double)pitch
3443 pan:(double)pan
3444 gain:(NSInteger)gain
3445 publish:(BOOL)publish NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:publish:));
3446
3501 - (int)playEffect:(int)soundId
3502 filePath:(NSString* _Nonnull)filePath
3503 loopCount:(NSInteger)loopCount
3504 pitch:(double)pitch
3505 pan:(double)pan
3506 gain:(NSInteger)gain
3507 publish:(BOOL)publish
3508 startPos:(int)startPos NS_SWIFT_NAME(playEffect(_:filePath:loopCount:pitch:pan:gain:publish:startPos:));
3509
3540 - (int)playAllEffectsWithLoopCount:(NSInteger)loopCount
3541 pitch:(double)pitch
3542 pan:(double)pan
3543 gain:(NSInteger)gain
3544 publish:(BOOL)publish NS_SWIFT_NAME(playAllEffects(withLoopCount:pitch:pan:gain:publish:));
3545
3559 - (int)getEffectsVolume NS_SWIFT_NAME(getEffectsVolume());
3560
3575 - (int)setEffectsVolume:(NSInteger)volume NS_SWIFT_NAME(setEffectsVolume(_:));
3576
3592 - (int)setVolumeOfEffect:(int)soundId
3593 withVolume:(int)volume NS_SWIFT_NAME(setVolumeOfEffect(_:withVolume:));
3594
3605 - (int)getVolumeOfEffect:(int)soundId NS_SWIFT_NAME(getVolumeOfEffect(_:));
3606
3616 - (int)pauseEffect:(int)soundId NS_SWIFT_NAME(pauseEffect(_:));
3617
3625 - (int)pauseAllEffects NS_SWIFT_NAME(pauseAllEffects());
3626
3636 - (int)resumeEffect:(int)soundId NS_SWIFT_NAME(resumeEffect(_:));
3637
3650 - (int)resumeAllEffects NS_SWIFT_NAME(resumeAllEffects());
3651
3668 - (int)stopEffect:(int)soundId NS_SWIFT_NAME(stopEffect(_:));
3669
3684 - (int)stopAllEffects NS_SWIFT_NAME(stopAllEffects());
3685
3699 - (int)getEffectDuration:(NSString* _Nonnull)filePath NS_SWIFT_NAME(getEffectDuration(_:));
3700
3716 - (int)setEffectPosition:(int)soundId pos:(NSInteger)pos NS_SWIFT_NAME(setEffectPosition(_:pos:));
3717
3729 - (int)getEffectCurrentPosition:(int)soundId NS_SWIFT_NAME(getEffectCurrentPosition(_:));
3730
3745 - (int)unloadEffect:(int)soundId NS_SWIFT_NAME(unloadEffect(_:));
3746
3753 - (int)unloadAllEffects NS_SWIFT_NAME(unloadAllEffects());
3754
3755 #pragma mark beautifier effect
3756
3795 - (int)setVoiceBeautifierPreset:(AgoraVoiceBeautifierPreset)preset NS_SWIFT_NAME(setVoiceBeautifierPreset(_:));
3796
3836 - (int)setAudioEffectPreset:(AgoraAudioEffectPreset)preset NS_SWIFT_NAME(setAudioEffectPreset(_:));
3837
3879 - (int)setVoiceConversionPreset:(AgoraVoiceConversionPreset)preset NS_SWIFT_NAME(setVoiceConversionPreset(_:));
3880
3955 - (int)setAudioEffectParameters:(AgoraAudioEffectPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setAudioEffectParameters(_:param1:param2:));
3956
4005 - (int)setVoiceBeautifierParameters:(AgoraVoiceBeautifierPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setVoiceBeautifierParameters(_:param1:param2:));
4006
4019 - (int)setVoiceConversionParameters:(AgoraVoiceConversionPreset)preset param1:(int)param1 param2:(int)param2 NS_SWIFT_NAME(setVoiceConversionParameters(_:param1:param2:));
4020
4038 - (int)setHeadphoneEQPreset:(AgoraHeadphoneEQPreset)preset NS_SWIFT_NAME(setHeadphoneEQPreset(_:));
4039
4058 - (int)setHeadphoneEQParameters:(int)lowGain highGain:(int)highGain NS_SWIFT_NAME(setHeadphoneEQParameters(_:highGain:));
4059
4078 - (int)enableVoiceAITuner:(BOOL)enabled type:(AgoraVoiceAITunerType)type NS_SWIFT_NAME(enableVoiceAITuner(_:type:));
4079
4080 #pragma mark Sound Position Indication
4081
4097 - (int)enableSoundPositionIndication:(BOOL)enabled NS_SWIFT_NAME(enableSoundPositionIndication(_:));
4098
4128 - (int)setRemoteVoicePosition:(NSUInteger)uid pan:(double)pan gain:(double)gain NS_SWIFT_NAME(setRemoteVoicePosition(_:pan:gain:));
4129
4152 - (int)enableSpatialAudio:(BOOL)enabled NS_SWIFT_NAME(enableSpatialAudio(_:));
4153
4169 - (int)setRemoteUserSpatialAudioParams:(NSUInteger)uid
4170 params:(AgoraSpatialAudioParams* _Nonnull)params NS_SWIFT_NAME(setRemoteUserSpatialAudioParams(_:params:));
4171
4172 #pragma mark Audio Noise Suppression
4173
4209 - (int)setAINSMode:(BOOL)enabled mode:(AUDIO_AINS_MODE)mode NS_SWIFT_NAME(setAINSMode(_:mode:));
4210
4211 #pragma mark Audio Mixing
4212
4257 - (int)startAudioMixing:(NSString * _Nonnull)filePath
4258 loopback:(BOOL)loopback
4259 cycle:(NSInteger)cycle NS_SWIFT_NAME(startAudioMixing(_:loopback:cycle:));
4260
4306 - (int)startAudioMixing:(NSString * _Nonnull)filePath
4307 loopback:(BOOL)loopback
4308 cycle:(NSInteger)cycle
4309 startPos:(NSInteger)startPos NS_SWIFT_NAME(startAudioMixing(_:loopback:cycle:startPos:));
4310
4323 - (int)stopAudioMixing NS_SWIFT_NAME(stopAudioMixing());
4324
4337 - (int)pauseAudioMixing NS_SWIFT_NAME(pauseAudioMixing());
4338
4351 - (int)resumeAudioMixing NS_SWIFT_NAME(resumeAudioMixing());
4352
4375 - (int)selectAudioTrack:(NSInteger)index NS_SWIFT_NAME(selectAudioTrack(_:));
4376
4388 - (int)getAudioTrackCount NS_SWIFT_NAME(getAudioTrackCount());
4389
4407 - (int)adjustAudioMixingVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingVolume(_:));
4408
4425 - (int)adjustAudioMixingPublishVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingPublishVolume(_:));
4426
4441 - (int)getAudioMixingPublishVolume NS_SWIFT_NAME(getAudioMixingPublishVolume());
4442
4458 - (int)adjustAudioMixingPlayoutVolume:(NSInteger)volume NS_SWIFT_NAME(adjustAudioMixingPlayoutVolume(_:));
4459
4473 - (int)getAudioMixingPlayoutVolume NS_SWIFT_NAME(getAudioMixingPlayoutVolume());
4474
4487 - (int)getAudioMixingDuration NS_SWIFT_NAME(getAudioMixingDuration());
4488
4507 - (int)getAudioMixingCurrentPosition NS_SWIFT_NAME(getAudioMixingCurrentPosition());
4508
4524 - (int)setAudioMixingPosition:(NSInteger)pos NS_SWIFT_NAME(setAudioMixingPosition(_:));
4525
4551 - (int)setAudioMixingDualMonoMode:(AgoraAudioMixingDualMonoMode)mode NS_SWIFT_NAME(setAudioMixingDualMonoMode(_:));
4552
4572 - (int)setAudioMixingPitch:(NSInteger)pitch NS_SWIFT_NAME(setAudioMixingPitch(_:));
4573
4592 - (int)setAudioMixingPlaybackSpeed:(NSInteger)speed NS_SWIFT_NAME(setAudioMixingPlaybackSpeed(_:));
4593
4594 #pragma mark Audio Recording
4595
4624 - (int)startAudioRecording:(NSString * _Nonnull)filePath
4625 quality:(AgoraAudioRecordingQuality)quality NS_SWIFT_NAME(startAudioRecording(_:quality:));
4626
4648 - (int)startAudioRecordingWithConfig:(AgoraAudioRecordingConfiguration * _Nonnull)config NS_SWIFT_NAME(startAudioRecording(withConfig:));
4649
4667 - (int)setAudioEncodedFrameDelegate:(id<AgoraAudioEncodedFrameDelegate> _Nullable)delegate config:(AgoraAudioEncodedFrameDelegateConfig * _Nonnull)config NS_SWIFT_NAME(setAudioEncodedFrameDelegate(_:config:));
4668
4676 - (int)stopAudioRecording NS_SWIFT_NAME(stopAudioRecording());
4677
4678 #pragma mark Echo Test
4679
4706 - (int)startEchoTestWithConfig:(AgoraEchoTestConfiguration* _Nonnull)config NS_SWIFT_NAME(startEchoTest(withConfig:));
4707
4720 - (int)stopEchoTest NS_SWIFT_NAME(stopEchoTest());
4721
4722
4723 #pragma mark Miscellaneous Audio Control
4724
4742 - (int)enableInEarMonitoring:(BOOL)enabled NS_SWIFT_NAME(enable(inEarMonitoring:));
4743
4764 - (int)enableInEarMonitoring:(BOOL)enabled includeAudioFilters:(AgoraEarMonitoringFilterType)includeAudioFilters NS_SWIFT_NAME(enable(inEarMonitoring:includeAudioFilters:));
4765
4783 - (int)setInEarMonitoringVolume:(NSInteger)volume NS_SWIFT_NAME(setInEarMonitoringVolume(_:));
4784
4785 #if TARGET_OS_IPHONE
4786
4807 - (void)setAudioSessionOperationRestriction:(AgoraAudioSessionOperationRestriction)restriction NS_SWIFT_NAME(setAudioSessionOperationRestriction(_:));
4808 #endif
4809
4810 #pragma mark Dual Video Mode
4811
4838 - (int)enableDualStreamMode:(BOOL)enabled NS_SWIFT_NAME(enableDualStreamMode(_:)) __deprecated_msg("use setDualStreamMode: instead.");
4839
4871 - (int)enableDualStreamMode:(BOOL)enabled
4872 streamConfig:(AgoraSimulcastStreamConfig* _Nonnull)streamConfig NS_SWIFT_NAME(enableDualStreamMode(_:streamConfig:)) __deprecated_msg("use setDualStreamMode: instead.");
4873
4904 - (int)setDualStreamMode:(AgoraSimulcastStreamMode)mode NS_SWIFT_NAME(setDualStreamMode(_:));
4905
4943 - (int)setDualStreamMode:(AgoraSimulcastStreamMode)mode
4944 streamConfig:(AgoraSimulcastStreamConfig* _Nonnull)streamConfig NS_SWIFT_NAME(setDualStreamMode(_:streamConfig:));
4945
4965 - (int)setSimulcastConfig:(AgoraSimulcastConfig* _Nonnull)simulcastConfig NS_SWIFT_NAME(setSimulcastConfig(_:));
4966
5003 - (int)setRemoteDefaultVideoStreamType:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteDefaultVideoStreamType(_:));
5004
5042 - (int)setRemoteVideoStream:(NSUInteger)uid
5043 type:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteVideoStream(_:type:));
5044
5069 - (int)setRemoteVideoSubscriptionOptions:(NSUInteger)uid
5070 options:(AgoraVideoSubscriptionOptions* _Nonnull)options NS_SWIFT_NAME(setRemoteVideoSubscriptionOptions(_:options:));
5071
5072 #pragma mark Subscribe Blocklist / Allowlist
5073
5100 - (int)setSubscribeAudioBlocklist:(NSArray <NSNumber *> *_Nonnull)blocklist NS_SWIFT_NAME(setSubscribeAudioBlocklist(_:));
5101
5127 - (int)setSubscribeAudioAllowlist:(NSArray <NSNumber *> *_Nonnull)allowlist NS_SWIFT_NAME(setSubscribeAudioAllowlist(_:));
5128
5155 - (int)setSubscribeVideoBlocklist:(NSArray <NSNumber *> *_Nonnull)blocklist NS_SWIFT_NAME(setSubscribeVideoBlocklist(_:));
5156
5182 - (int)setSubscribeVideoAllowlist:(NSArray <NSNumber *> *_Nonnull)allowlist NS_SWIFT_NAME(setSubscribeVideoAllowlist(_:));
5183
5184 #pragma mark Stream Fallback
5185
5207 - (int)setRemoteSubscribeFallbackOption:(AgoraStreamFallbackOptions)option NS_SWIFT_NAME(setRemoteSubscribeFallbackOption(_:));
5208
5220 - (int)setHighPriorityUserList:(NSArray <NSNumber *> *_Nullable)uidList
5221 option:(AgoraStreamFallbackOptions)option;
5222
5223
5224 #pragma mark External Media Source
5225
5248 - (void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture sourceType:(AgoraExternalVideoSourceType)sourceType NS_SWIFT_NAME(setExternalVideoSource(_:useTexture:sourceType:));
5249
5269 - (void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture
5270 sourceType:(AgoraExternalVideoSourceType)sourceType
5271 encodedVideoTrackOption:(AgoraEncodedVideoTrackOptions* _Nonnull)encodedVideoTrackOption NS_SWIFT_NAME(setExternalVideoSource(_:useTexture:sourceType:encodedVideoTrackOption:));
5272
5287 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame NS_SWIFT_NAME(pushExternalVideoFrame(_:)) __deprecated_msg("use pushExternalVideoFrame:frame,videoTrackId options instead.");
5288
5323 - (BOOL)pushExternalVideoFrame:(AgoraVideoFrame * _Nonnull)frame videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalVideoFrame(_:videoTrackId:));
5324
5339 - (int)pushExternalEncodedVideoFrame:(NSData* _Nonnull)frame
5340 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info NS_SWIFT_NAME(pushExternalEncodedVideoFrame(_:info:));
5341
5357 - (int)pushExternalEncodedVideoFrame:(NSData* _Nonnull)frame
5358 info:(AgoraEncodedVideoFrameInfo * _Nonnull)info
5359 videoTrackId:(NSUInteger)videoTrackId NS_SWIFT_NAME(pushExternalEncodedVideoFrame(_:info:videoTrackId:));
5360
5361
5379 - (unsigned int)createCustomVideoTrack NS_SWIFT_NAME(createCustomVideoTrack());
5380
5388 - (unsigned int)createCustomEncodedVideoTrack:(AgoraEncodedVideoTrackOptions* _Nonnull)encodedVideoTrackOption NS_SWIFT_NAME(createCustomEncodedVideoTrack(_:));
5389
5399 - (int)destroyCustomVideoTrack:(NSUInteger)videoTrackId NS_SWIFT_NAME(destroyCustomVideoTrack(_:));
5400
5409 - (int)destroyCustomEncodedVideoTrack:(NSUInteger)videoTrackId NS_SWIFT_NAME(destroyCustomEncodedVideoTrack(_:));
5410
5411 #pragma mark External Audio Data
5412
5437 - (void)enableExternalAudioSink:(BOOL)enabled
5438 sampleRate:(NSUInteger)sampleRate
5439 channels:(NSUInteger)channels NS_SWIFT_NAME(enableExternalAudioSink(_:sampleRate:channels:));
5440
5477 - (BOOL)pullPlaybackAudioFrameRawData:(void * _Nonnull)data
5478 lengthInByte:(NSUInteger)lengthInByte NS_SWIFT_NAME(pullPlaybackAudioFrameRawData(_:lengthInByte:));
5479
5496 - (CMSampleBufferRef _Nullable)pullPlaybackAudioFrameSampleBufferByLengthInByte:(NSUInteger)lengthInByte NS_SWIFT_NAME(pullPlaybackAudioFrameSampleBufferBy(lengthInByte:));
5497
5525 - (int)createCustomAudioTrack:(AgoraAudioTrackType)trackType
5526 config:(AgoraAudioTrackConfig* _Nonnull)config;
5527
5537 - (int)destroyCustomAudioTrack:(NSInteger)trackId;
5538
5561 - (int)enableCustomAudioLocalPlayback:(NSInteger)trackId enabled:(BOOL)enabled NS_SWIFT_NAME(enableCustomAudioLocalPlayback(_:enabled:));
5562
5574 - (int)pushExternalAudioFrameRawData:(void * _Nonnull)data
5575 samples:(NSInteger)samples
5576 trackId:(NSInteger)trackId
5577 timestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(pushExternalAudioFrameRawData(_:samples:trackId:timestamp:)) __deprecated_msg("use pushExternalAudioFrameRawData:samples:sampleRate:channels:trackId:timestamp: instead.");
5578
5607 - (int)pushExternalAudioFrameRawData:(void* _Nonnull)data
5608 samples:(NSInteger)samples
5609 sampleRate:(NSInteger)sampleRate
5610 channels:(NSInteger)channels
5611 trackId:(NSInteger)trackId
5612 timestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(pushExternalAudioFrameRawData(_:samples:sampleRate:channels:trackId:timestamp:));
5613
5623 - (int)pushExternalAudioFrameSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer NS_SWIFT_NAME(pushExternalAudioFrameSampleBuffer(_:)) __deprecated_msg("use pushExternalAudioFrameSampleBuffer:sampleRate:channels:trackId: instead.");
5624
5648 - (int)pushExternalAudioFrameSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer
5649 sampleRate:(NSInteger)sampleRate
5650 channels:(NSInteger)channels
5651 trackId:(NSInteger)trackId NS_SWIFT_NAME(pushExternalAudioFrameSampleBuffer(_:sampleRate:channels:trackId:));
5652
5675 - (int)setRecordingAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5676 channel:(NSInteger)channel
5677 mode:(AgoraAudioRawFrameOperationMode)mode
5678 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setRecordingAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
5679
5702 - (int)setPlaybackAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5703 channel:(NSInteger)channel
5704 mode:(AgoraAudioRawFrameOperationMode)mode
5705 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setPlaybackAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
5706
5728 - (int)setMixedAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5729 channel:(NSInteger)channel
5730 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setMixedAudioFrameParametersWithSampleRate(_:channel:samplesPerCall:));
5731
5762 - (int)setEarMonitoringAudioFrameParametersWithSampleRate:(NSInteger)sampleRate
5763 channel:(NSInteger)channel
5764 mode:(AgoraAudioRawFrameOperationMode)mode
5765 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setEarMonitoringAudioFrameParametersWithSampleRate(_:channel:mode:samplesPerCall:));
5766
5785 - (int)setPlaybackAudioFrameBeforeMixingParametersWithSampleRate:(NSInteger)sampleRate
5786 channel:(NSInteger)channel NS_SWIFT_NAME(setPlaybackAudioFrameBeforeMixingParametersWithSampleRate(_:channel:));
5787
5811 - (int)setPlaybackAudioFrameBeforeMixingParametersWithSampleRate:(NSInteger)sampleRate
5812 channel:(NSInteger)channel
5813 samplesPerCall:(NSInteger)samplesPerCall NS_SWIFT_NAME(setPlaybackAudioFrameBeforeMixingParametersWithSampleRate(_:channel:samplesPerCall:));
5833 - (int)adjustCustomAudioPublishVolume:(NSInteger)trackId volume:(NSInteger)volume NS_SWIFT_NAME(adjustCustomAudioPublishVolume(_:volume:));
5834
5854 - (int)adjustCustomAudioPlayoutVolume:(NSInteger)trackId volume:(NSInteger)volume NS_SWIFT_NAME(adjustCustomAudioPlayoutVolume(_:volume:));
5855
5873 - (int64_t)getCurrentMonotonicTimeInMs NS_SWIFT_NAME(getCurrentMonotonicTimeInMs());
5874
5875 #pragma mark Audio spectrum monitor
5876
5894 - (int)registerAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable )delegate NS_SWIFT_NAME(registerAudioSpectrumDelegate(_:));
5895
5911 - (int)unregisterAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable)delegate NS_SWIFT_NAME(unregisterAudioSpectrumDelegate(_:));
5912
5931 - (int)enableAudioSpectrumMonitor:(int)intervalInMS NS_SWIFT_NAME(enableAudioSpectrumMonitor(_:));
5932
5946 - (int)disableAudioSpectrumMonitor NS_SWIFT_NAME(disableAudioSpectrumMonitor());
5947
5948 #pragma mark Built-in Encryption
5949
5978 - (int)enableEncryption:(BOOL)enabled encryptionConfig:(AgoraEncryptionConfig * _Nonnull)config NS_SWIFT_NAME(enableEncryption(_:encryptionConfig:));
5979
5980 #pragma mark Data Stream
5981
6020 - (int)createDataStream:(NSInteger * _Nonnull)streamId
6021 reliable:(BOOL)reliable
6022 ordered:(BOOL)ordered NS_SWIFT_NAME(createDataStream(_:reliable:ordered:));
6023
6047 - (int)createDataStream:(NSInteger * _Nonnull)streamId
6048 config:(AgoraDataStreamConfig * _Nonnull)config NS_SWIFT_NAME(createDataStream(_:config:));
6049
6081 - (int)sendStreamMessage:(NSInteger)streamId
6082 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendStreamMessage(_:data:));
6083
6084 #pragma mark Common Data Transmission
6085
6102 - (int)sendRdtMessage:(NSInteger)uid
6103 type:(AgoraRdtStreamType)type
6104 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendRdtMessage(_:type:data:));
6105
6117 - (int)sendMediaControlMessage:(NSInteger)uid
6118 data:(NSData * _Nonnull)data NS_SWIFT_NAME(sendMediaControlMessage(_:data:));
6119
6120 #pragma mark Stream Publish
6121
6154 - (int)startRtmpStreamWithoutTranscoding:(NSString* _Nonnull)url NS_SWIFT_NAME(startRtmpStreamWithoutTranscoding(_:));
6155
6190 - (int)startRtmpStreamWithTranscoding:(NSString* _Nonnull)url transcoding:(AgoraLiveTranscoding* _Nullable)transcoding NS_SWIFT_NAME(startRtmpStream(withTranscoding:transcoding:));
6191
6208 - (int)updateRtmpTranscoding:(AgoraLiveTranscoding* _Nullable)transcoding NS_SWIFT_NAME(updateRtmpTranscoding(_:));
6209
6230 - (int)stopRtmpStream:(NSString* _Nonnull)url NS_SWIFT_NAME(stopRtmpStream(_:));
6231
6232 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
6233 #pragma mark Screen Capture
6234
6248 - (int)startScreenCapture:(AgoraVideoSourceType)sourceType config:(AgoraScreenCaptureConfiguration * _Nullable)config NS_SWIFT_NAME(startScreenCapture(_:config:));
6249
6265 - (int)stopScreenCapture:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopScreenCapture(_:));
6266
6305 - (int)startScreenCaptureByDisplayId:(UInt32)displayId
6306 regionRect:(CGRect)regionRect
6307 captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams NS_SWIFT_NAME(startScreenCapture(byDisplayId:regionRect:captureParams:));
6308
6349 - (int)startScreenCaptureByWindowId:(UInt32)windowId
6350 regionRect:(CGRect)regionRect
6351 captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams NS_SWIFT_NAME(startScreenCapture(byWindowId:regionRect:captureParams:));
6352
6365 - (int)updateScreenCaptureRegion:(CGRect)rect NS_SWIFT_NAME(updateScreenCaptureRegion(_:));
6366
6384 - (int)updateScreenCaptureParameters:(AgoraScreenCaptureParameters * _Nonnull)captureParams NS_SWIFT_NAME(updateScreenCaptureParameters(_:));
6385
6416 - (NSArray<AgoraScreenCaptureSourceInfo*>* _Nullable)getScreenCaptureSourcesWithThumbSize:(NSSize)thumbSize iconSize:(NSSize)iconSize includeScreen:(BOOL)includeScreen NS_SWIFT_NAME(getScreenCaptureSources(withThumbSize:iconSize:includeScreen:));
6417
6418 #endif
6419
6436 - (int)setScreenCaptureScenario:(AgoraScreenScenarioType)scenarioType NS_SWIFT_NAME(setScreenCaptureScenario(_:));
6437
6455 - (int)stopScreenCapture NS_SWIFT_NAME(stopScreenCapture());
6456
6457 #if TARGET_OS_IPHONE
6458
6501 - (int)startScreenCapture:(AgoraScreenCaptureParameters2* _Nullable)parameters NS_SWIFT_NAME(startScreenCapture(_:));
6502
6512 - (int)updateScreenCapture:(AgoraScreenCaptureParameters2* _Nullable)parameters NS_SWIFT_NAME(updateScreenCapture(_:));
6513
6533 - (AgoraScreenCaptureFrameRateCapability)queryScreenCaptureCapability NS_SWIFT_NAME(queryScreenCaptureCapability());
6534
6549 - (NSArray<AgoraFocalLengthInfo *>* _Nullable)queryCameraFocalLengthCapability NS_SWIFT_NAME(queryCameraFocalLengthCapability());
6550
6551 #pragma mark Camera Control
6552
6564 - (BOOL)isCameraZoomSupported NS_SWIFT_NAME(isCameraZoomSupported());
6565
6576 - (CGFloat)cameraMaxZoomFactor NS_SWIFT_NAME(cameraMaxZoomFactor());
6577
6603 - (CGFloat)setCameraZoomFactor:(CGFloat)zoomFactor NS_SWIFT_NAME(setCameraZoomFactor(_:));
6604
6616 - (BOOL)isCameraFocusPositionInPreviewSupported NS_SWIFT_NAME(isCameraFocusPositionInPreviewSupported());
6617
6635 - (BOOL)setCameraFocusPositionInPreview:(CGPoint)position NS_SWIFT_NAME(setCameraFocusPositionInPreview(_:));
6636
6648 - (BOOL)isCameraExposurePositionSupported NS_SWIFT_NAME(isCameraExposurePositionSupported());
6649
6667 - (BOOL)setCameraExposurePosition:(CGPoint)positionInView NS_SWIFT_NAME(setCameraExposurePosition(_:));
6668
6687 - (BOOL)isCameraExposureSupported NS_SWIFT_NAME(isCameraExposureSupported());
6688
6720 - (CGFloat)setCameraExposureFactor:(CGFloat)exposureFactor NS_SWIFT_NAME(setCameraExposureFactor(_:));
6721
6739 - (BOOL)isCameraTorchSupported NS_SWIFT_NAME(isCameraTorchSupported());
6740
6757 - (BOOL)setCameraTorchOn:(BOOL)isOn NS_SWIFT_NAME(setCameraTorchOn(_:));
6758
6770 - (BOOL)isCameraAutoFocusFaceModeSupported NS_SWIFT_NAME(isCameraAutoFocusFaceModeSupported());
6771
6789 - (BOOL)setCameraAutoFocusFaceModeEnabled:(BOOL)enable NS_SWIFT_NAME(setCameraAutoFocusFaceModeEnabled(_:));
6790
6802 - (BOOL)isCameraAutoExposureFaceModeSupported NS_SWIFT_NAME(isCameraAutoExposureFaceModeSupported());
6803
6813 - (BOOL)setCameraAutoExposureFaceModeEnabled:(BOOL)enable NS_SWIFT_NAME(setCameraAutoExposureFaceModeEnabled(_:));
6814
6834 - (int)switchCamera NS_SWIFT_NAME(switchCamera());
6835
6877 - (int)enableMultiCamera:(BOOL)enabled config:(AgoraCameraCapturerConfiguration* _Nullable)config NS_SWIFT_NAME(enableMultiCamera(_:config:));
6878
6904 - (int) setCameraStabilizationMode:(AgoraCameraStabilizationMode)mode NS_SWIFT_NAME(setCameraStabilizationMode(_:));
6905 #endif
6906
6920 - (BOOL)isCameraCenterStageSupported NS_SWIFT_NAME(isCameraCenterStageSupported());
6921
6958 - (int)enableCameraCenterStage:(BOOL)enabled NS_SWIFT_NAME(enableCameraCenterStage(_:));
6959
6978 - (int)setCameraCapturerConfiguration:(AgoraCameraCapturerConfiguration * _Nullable)config NS_SWIFT_NAME(setCameraCapturerConfiguration(_:));
6979
7003 - (int)startCameraCapture:(AgoraVideoSourceType)sourceType config:(AgoraCameraCapturerConfiguration * _Nullable)config NS_SWIFT_NAME(startCameraCapture(_:config:));
7004
7025 - (int)stopCameraCapture:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(stopCameraCapture(_:));
7026
7027 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
7028 #pragma mark macOS Device
7029
7042 - (void)monitorDeviceChange:(BOOL)enabled NS_SWIFT_NAME(monitorDeviceChange(_:));
7043
7060 - (NSArray<AgoraRtcDeviceInfo *> * _Nullable)enumerateDevices:(AgoraMediaDeviceType)type NS_SWIFT_NAME(enumerateDevices(_:));
7061
7076 - (AgoraRtcDeviceInfo * _Nullable)getDeviceInfo:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceInfo(_:));
7077
7090 - (int)setDevice:(AgoraMediaDeviceType)type deviceId:(NSString * _Nonnull)deviceId NS_SWIFT_NAME(setDevice(_:deviceId:));
7091
7102 - (AgoraRtcDeviceInfo* _Nullable)getDefaultAudioDevice:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDefaultAudioDevice(_:));
7103
7114 - (int)getDeviceVolume:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceVolume(_:));
7115
7132 - (int)setDeviceVolume:(AgoraMediaDeviceType)type volume:(int)volume NS_SWIFT_NAME(setDeviceVolume(_:volume:));
7133
7161 - (int)startAudioDeviceLoopbackTest:(int)indicationInterval NS_SWIFT_NAME(startAudioDeviceLoopbackTest(_:));
7162
7176 - (int)stopAudioDeviceLoopbackTest NS_SWIFT_NAME(stopAudioDeviceLoopbackTest());
7177
7193 - (int)followSystemPlaybackDevice:(BOOL)enable NS_SWIFT_NAME(followSystemPlaybackDevice(_:));
7194
7210 - (int)followSystemRecordingDevice:(BOOL)enable NS_SWIFT_NAME(followSystemRecordingDevice(_:));
7211
7220 - (int)startCaptureDeviceTest:(NSView * _Nonnull)view NS_SWIFT_NAME(startCaptureDeviceTest(_:));
7221
7228 - (int)stopCaptureDeviceTest NS_SWIFT_NAME(stopCaptureDeviceTest());
7229 #endif
7230
7231 #pragma mark Face Detection
7232
7233 #if TARGET_OS_IPHONE
7234
7255 - (int)enableFaceDetection:(BOOL)enable NS_SWIFT_NAME(enableFaceDetection(_:));
7256 #endif
7257
7258 #pragma mark Watermark
7259
7286 - (int)addVideoWatermark:(AgoraImage * _Nonnull)watermark NS_SWIFT_NAME(addVideoWatermark(_:)) __deprecated_msg("use addVideoWatermarkWithConfig:config instead.");
7287
7336 - (int)addVideoWatermark:(NSURL* _Nonnull)url options:(WatermarkOptions* _Nonnull)options NS_SWIFT_NAME(addVideoWatermark(_:options:)) __deprecated_msg("use addVideoWatermarkWithConfig:config instead.");
7337
7353 - (int)addVideoWatermarkWithConfig:(WatermarkConfig* _Nonnull)config NS_SWIFT_NAME(addVideoWatermark(_:));
7354
7370 - (int)removeVideoWatermark:(NSString* _Nonnull)id NS_SWIFT_NAME(removeVideoWatermark(_:));
7371
7379 - (int)clearVideoWatermarks NS_SWIFT_NAME(clearVideoWatermarks());
7380
7381 #pragma mark String UID
7382
7431 - (int)registerLocalUserAccount:(NSString* _Nonnull)userAccount appId:(NSString* _Nonnull)appId NS_SWIFT_NAME(registerLocalUserAccount(_:appId:));
7432
7523 - (int)joinChannelByToken:(NSString * _Nullable)token
7524 channelId:(NSString * _Nonnull)channelId
7525 userAccount:(NSString * _Nonnull)userAccount
7526 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:userAccount:joinSuccess:));
7527
7621 - (int)joinChannelByToken:(NSString * _Nullable)token
7622 channelId:(NSString * _Nonnull)channelId
7623 userAccount:(NSString * _Nonnull)userAccount
7624 mediaOptions:(AgoraRtcChannelMediaOptions * _Nonnull)mediaOptions
7625 joinSuccess:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))joinSuccessBlock NS_SWIFT_NAME(joinChannel(byToken:channelId:userAccount:mediaOptions:joinSuccess:));
7626
7647 - (AgoraUserInfo* _Nullable)getUserInfoByUserAccount:(NSString* _Nonnull)userAccount withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUserAccount:withError:));
7648
7669 - (AgoraUserInfo* _Nullable)getUserInfoByUid:(NSUInteger)uid withError:(AgoraErrorCode* _Nullable)error NS_SWIFT_NAME(getUserInfo(byUid:withError:));
7670
7671 #pragma mark Custom Audio PCM Frame
7672
7690 - (BOOL)setAudioFrameDelegate:(id<AgoraAudioFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setAudioFrameDelegate(_:));
7691
7692 #pragma mark Custom Video Frame
7693
7723 - (BOOL)setVideoFrameDelegate:(id<AgoraVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setVideoFrameDelegate(_:));
7724
7725 #pragma mark Encoded Video Frame
7726
7743 - (BOOL)setEncodedVideoFrameDelegate:(id<AgoraEncodedVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setEncodedVideoFrameDelegate(_:));
7744
7745 #pragma mark Custom Face Info
7746
7773 - (BOOL)setFaceInfoDelegate:(id<AgoraFaceInfoDelegate> _Nullable)delegate NS_SWIFT_NAME(setFaceInfoDelegate(_:));
7774
7775 #pragma mark Custom Media Metadata
7776
7797 - (BOOL)setMediaMetadataDataSource:(id<AgoraMediaMetadataDataSource> _Nullable)metadataDataSource withType:(AgoraMetadataType)type NS_SWIFT_NAME(setMediaMetadataDataSource(_:with:));
7798
7819 - (BOOL)setMediaMetadataDelegate:(id<AgoraMediaMetadataDelegate> _Nullable)metadataDelegate withType:(AgoraMetadataType)type NS_SWIFT_NAME(setMediaMetadataDelegate(_:with:));
7820
7821 #pragma mark Miscellaneous Methods
7822
7828 + (NSString * _Nonnull)getSdkVersion NS_SWIFT_NAME(getSdkVersion());
7829
7838 + (NSString* _Nonnull)getErrorDescription:(NSInteger)error NS_SWIFT_NAME(getErrorDescription(_:));
7839
7850 - (void * _Nullable)getNativeHandle NS_SWIFT_NAME(getNativeHandle());
7851
7868 - (int)setLogFile:(NSString * _Nonnull)filePath NS_SWIFT_NAME(setLogFile(_:));
7869
7887 - (int)setLogFilter:(NSUInteger)filter NS_SWIFT_NAME(setLogFilter(_:));
7888
7922 - (int)setLogFileSize:(NSUInteger)fileSizeInKBytes NS_SWIFT_NAME(setLogFileSize(_:));
7923
7931 - (NSString * _Nullable)uploadLogFile NS_SWIFT_NAME(uploadLogFile());
7932
7943 - (int)writeLog:(AgoraLogLevel)level content:(NSString * _Nonnull)content NS_SWIFT_NAME(writeLog(_:content:));
7944
7957 - (NSString * _Nullable)getCallId NS_SWIFT_NAME(getCallId());
7958
7975 - (int)rate:(NSString * _Nonnull)callId
7976 rating:(NSInteger)rating
7977 description:(NSString * _Nullable)description NS_SWIFT_NAME(rate(_:rating:description:));
7978
7997 - (int)complain:(NSString * _Nonnull)callId
7998 description:(NSString * _Nullable)description NS_SWIFT_NAME(complain(_:description:));
7999
8014 - (int)enableMainQueueDispatch:(BOOL)enabled NS_SWIFT_NAME(enableMainQueueDispatch(_:));
8015
8041 - (int)startLastmileProbeTest:(AgoraLastmileProbeConfig *_Nullable)config NS_SWIFT_NAME(startLastmileProbeTest(_:));
8042
8050 - (int)stopLastmileProbeTest NS_SWIFT_NAME(stopLastmileProbeTest());
8051
8062 - (int)setParameters:(NSString * _Nonnull)options NS_SWIFT_NAME(setParameters(_:));
8063
8069 - (NSString * _Nullable)getParameter:(NSString * _Nonnull)parameter
8070 args:(NSString * _Nullable)args NS_SWIFT_NAME(getParameter(_:args:));
8071
8084 - (uint64_t)getNtpWallTimeInMs;
8085
8086 #pragma mark MediaPlayer
8087
8103 - (id<AgoraRtcMediaPlayerProtocol>_Nullable)createMediaPlayerWithDelegate:(id<AgoraRtcMediaPlayerDelegate>_Nullable)delegate NS_SWIFT_NAME(createMediaPlayer(with:));
8104
8119 - (id<AgoraRtcMediaPlayerCacheManagerProtocol> _Nullable)createMediaPlayerCacheManager NS_SWIFT_NAME(createMediaPlayerCacheManager());
8120
8130 - (int)destroyMediaPlayer:(id<AgoraRtcMediaPlayerProtocol>_Nullable)mediaPlayer NS_SWIFT_NAME(destroyMediaPlayer(_:));
8131
8137 - (id<AgoraRtcMediaPlayerProtocol> _Nullable)getMediaPlayer:(int)mediaPlayerId NS_SWIFT_NAME(getMediaPlayer(_:));
8138
8139 #pragma mark rhythm player
8140
8176 - (int)startRhythmPlayer:(NSString * _Nonnull)sound1 sound2:(NSString * _Nonnull)sound2 config:(AgoraRhythmPlayerConfig * _Nullable)config NS_SWIFT_NAME(startRhythmPlayer(_:sound2:config:));
8177
8189 - (int)stopRhythmPlayer NS_SWIFT_NAME(stopRhythmPlayer());
8190
8216 - (int)configRhythmPlayer:(AgoraRhythmPlayerConfig * _Nullable)config NS_SWIFT_NAME(configRhythmPlayer(_:));
8217
8218 #pragma mark Streaming Kit
8219
8236 - (int)setDirectCdnStreamingAudioConfiguration:(AgoraAudioProfile)profile NS_SWIFT_NAME(setDirectCdnStreamingAudioConfiguration(_:));
8237
8262 - (int)setDirectCdnStreamingVideoConfiguration:(AgoraVideoEncoderConfiguration * _Nonnull)config NS_SWIFT_NAME(setDirectCdnStreamingVideoConfiguration(_:));
8263
8302 - (int)startDirectCdnStreaming:(id<AgoraDirectCdnStreamingEventDelegate> _Nonnull)delegate
8303 publishUrl:(NSString * _Nonnull)publishUrl
8304 mediaOptions:(AgoraDirectCdnStreamingMediaOptions * _Nonnull)options NS_SWIFT_NAME(startDirectCdnStreaming(_:publishUrl:mediaOptions:));
8305
8315 - (int)stopDirectCdnStreaming NS_SWIFT_NAME(stopDirectCdnStreaming());
8316
8328 - (int)updateDirectCdnStreamingMediaOptions:(AgoraDirectCdnStreamingMediaOptions * _Nonnull)options NS_SWIFT_NAME(updateDirectCdnStreamingMediaOptions(_:));
8329
8347 - (int)setAdvancedAudioOptions:(AgoraAdvancedAudioOptions * _Nonnull)options NS_SWIFT_NAME(setAdvancedAudioOptions(_:));
8348
8360 - (int)sendCustomReportMessage:(NSString * _Nullable)messageId
8361 category:(NSString * _Nullable)category
8362 event:(NSString * _Nullable)event
8363 label:(NSString * _Nullable)label
8364 value:(NSInteger)value NS_SWIFT_NAME(sendCustomReportMessage(_:category:event:label:value:));
8365
8378 - (int)setLogLevel:(AgoraLogLevel)level NS_SWIFT_NAME(setLogLevel(_:));
8379
8399 - (int)setLocalAccessPoint:(AgoraLocalAccessPointConfiguration* _Nonnull)config NS_SWIFT_NAME(setLocalAccessPoint(withConfig:));
8400
8435 - (int)setCloudProxy:(AgoraCloudProxyType)proxyType NS_SWIFT_NAME(setCloudProxy(_:));
8436
8466 - (NSInteger)takeSnapshot:(NSInteger)uid filePath:(NSString* _Nonnull)filePath NS_SWIFT_NAME(takeSnapshot(_:filePath:));
8467
8492 - (NSInteger)takeSnapshotWithConfig:(NSInteger)uid config:(AgoraSnapshotConfig* _Nonnull)config NS_SWIFT_NAME(takeSnapshotWithConfig(_:config:));
8493
8523 - (int)enableContentInspect:(BOOL)enabled config:(AgoraContentInspectConfig* _Nonnull)config NS_SWIFT_NAME(enableContentInspect(_:config:));
8524
8545 - (int)setAVSyncSource:(NSString* _Nonnull)channelId uid:(NSUInteger)uid NS_SWIFT_NAME(setAVSyncSource(_:uid:));
8546
8556 - (int)sendAudioMetadata:(NSData * _Nonnull)metadata NS_SWIFT_NAME(sendAudioMetadata(_:));
8577 - (int)enableVideoImageSource:(BOOL)enable
8578 options:(AgoraImageTrackOptions *_Nullable)options NS_SWIFT_NAME(enableVideoImageSource(_:options:));
8579
8600 - (int)getNetworkType NS_SWIFT_NAME(getNetworkType());
8601
8623 - (AgoraMediaRecorder * _Nullable)createMediaRecorder:(AgoraRecorderStreamInfo * _Nonnull)info NS_SWIFT_NAME(createMediaRecorder(withInfo:));
8624
8640 - (int)destroyMediaRecorder:(AgoraMediaRecorder * _Nullable)mediaRecorder;
8641
8642 #pragma mark Channel Transcoder
8643
8648 - (id<AgoraH265TranscoderProtocol>_Nullable)getH265Transcoder NS_SWIFT_NAME (getH265Transcoder());
8649
8650 #pragma mark Deprecated Methods
8651
8663 - (int)setLocalVideoMirrorMode:(AgoraVideoMirrorMode)mode NS_SWIFT_NAME(setLocalVideoMirrorMode(_:)) __deprecated;
8664
8686 - (int)enableWebSdkInteroperability:(BOOL)enabled NS_SWIFT_NAME(enableWebSdkInteroperability(_:)) __deprecated;
8687
8699 - (void)audioVolumeIndicationBlock:(void(^ _Nullable)(NSArray * _Nonnull speakers, NSInteger totalVolume))audioVolumeIndicationBlock NS_SWIFT_NAME(audioVolumeIndicationBlock(_:)) __deprecated_msg("use delegate instead.");
8700
8709 - (void)firstLocalVideoFrameBlock:(void(^ _Nullable)(NSInteger width, NSInteger height, NSInteger elapsed))firstLocalVideoFrameBlock NS_SWIFT_NAME(firstLocalVideoFrameBlock(_:)) __deprecated_msg("use delegate instead.");
8710
8721 - (void)firstRemoteVideoDecodedBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger width, NSInteger height, NSInteger elapsed))firstRemoteVideoDecodedBlock NS_SWIFT_NAME(firstRemoteVideoDecodedBlock(_:)) __deprecated_msg("use delegate instead.");
8722
8732 - (void)firstRemoteVideoFrameBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger width, NSInteger height, NSInteger elapsed))firstRemoteVideoFrameBlock NS_SWIFT_NAME(firstRemoteVideoFrameBlock(_:)) __deprecated_msg("use delegate instead.");
8733
8743 - (void)userJoinedBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger elapsed))userJoinedBlock NS_SWIFT_NAME(userJoinedBlock(_:)) __deprecated_msg("use delegate instead.");
8744
8753 - (void)userOfflineBlock:(void(^ _Nullable)(NSUInteger uid))userOfflineBlock NS_SWIFT_NAME(userOfflineBlock(_:)) __deprecated_msg("use delegate instead.");
8754
8764 - (void)userMuteAudioBlock:(void(^ _Nullable)(NSUInteger uid, BOOL muted))userMuteAudioBlock NS_SWIFT_NAME(userMuteAudioBlock(_:)) __deprecated_msg("use delegate instead.");
8765
8780 - (void)userMuteVideoBlock:(void(^ _Nullable)(NSUInteger uid, BOOL muted))userMuteVideoBlock NS_SWIFT_NAME(userMuteVideoBlock(_:)) __deprecated_msg("use delegate instead.");
8781
8789 - (void)localVideoStatBlock:(void(^ _Nullable)(NSInteger sentBitrate, NSInteger sentFrameRate))localVideoStatBlock NS_SWIFT_NAME(localVideoStatBlock(_:)) __deprecated_msg("use delegate instead.");
8790
8800 - (void)remoteVideoStatBlock:(void(^ _Nullable)(NSUInteger uid, NSInteger delay, NSInteger receivedBitrate, NSInteger receivedFrameRate))remoteVideoStatBlock NS_SWIFT_NAME(remoteVideoStatBlock(_:)) __deprecated_msg("use delegate instead.");
8801
8805 - (void)cameraReadyBlock:(void(^ _Nullable)(void))cameraReadyBlock NS_SWIFT_NAME(cameraReadyBlock(_:)) __deprecated_msg("use delegate instead.");
8806
8810 - (void)connectionLostBlock:(void(^ _Nullable)(void))connectionLostBlock NS_SWIFT_NAME(connectionLostBlock(_:)) __deprecated_msg("use delegate instead.");
8811
8822 - (void)rejoinChannelSuccessBlock:(void(^ _Nullable)(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed))rejoinChannelSuccessBlock NS_SWIFT_NAME(rejoinChannelSuccessBlock(_:)) __deprecated_msg("use delegate instead.");
8823
8830 - (void)rtcStatsBlock:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))rtcStatsBlock NS_SWIFT_NAME(rtcStatsBlock(_:)) __deprecated_msg("use delegate instead.");
8831
8841 - (void)audioQualityBlock:(void(^ _Nullable)(NSUInteger uid, AgoraNetworkQuality quality, NSUInteger delay, NSUInteger lost))audioQualityBlock NS_SWIFT_NAME(audioQualityBlock(_:)) __deprecated_msg("use delegate instead.");
8842
8851 - (void)networkQualityBlock:(void(^ _Nullable)(NSUInteger uid, AgoraNetworkQuality txQuality, AgoraNetworkQuality rxQuality))networkQualityBlock NS_SWIFT_NAME(networkQualityBlock(_:)) __deprecated_msg("use delegate instead.");
8852
8859 - (void)lastmileQualityBlock:(void(^ _Nullable)(AgoraNetworkQuality quality))lastmileQualityBlock NS_SWIFT_NAME(lastmileQualityBlock(_:)) __deprecated_msg("use delegate instead.");
8860
8864 - (void)mediaEngineEventBlock:(void(^ _Nullable)(NSInteger code))mediaEngineEventBlock NS_SWIFT_NAME(mediaEngineEventBlock(_:)) __deprecated_msg("use delegate instead.");
8865
8875 - (int)pauseAudio __deprecated_msg("use disableAudio instead.");
8876
8886 - (int)resumeAudio __deprecated_msg("use enableAudio instead.");
8887
8894 + (instancetype _Nonnull)sharedEngineWithAppId:(NSString * _Nonnull)AppId
8895 error:(void(^ _Nullable)(AgoraErrorCode errorCode))errorBlock NS_SWIFT_NAME(sharedEngine(withAppId:error:)) __deprecated_msg("use sharedEngineWithAppId:delegate: instead.");
8896
8902 - (int)setHighQualityAudioParametersWithFullband:(BOOL)fullband
8903 stereo:(BOOL)stereo
8904 fullBitrate:(BOOL)fullBitrate NS_SWIFT_NAME(setHighQualityAudioParametersWithFullband(_:stereo:fullBitrate:)) __deprecated_msg("use setAudioProfile:scenario: instead.");
8905
8906
8935 - (int)setAudioProfile:(AgoraAudioProfile)profile scenario:(AgoraAudioScenario)scenario NS_SWIFT_NAME(setAudioProfile(_:scenario:)) __deprecated_msg("use setAudioProfile: instead.");
8936
8943 - (NSString * _Nullable)getDeviceId:(AgoraMediaDeviceType)type NS_SWIFT_NAME(getDeviceId(_:)) __deprecated_msg("use getDeviceInfo: instead.");
8944
8967 - (int)setExternalAudioSource:(BOOL)enabled
8968 sampleRate:(NSInteger)sampleRate
8969 channels:(NSInteger)channels NS_SWIFT_NAME(setExternalAudioSource(_:sampleRate:channels:)) __deprecated_msg("use createCustomAudioTrack:config: instead.");
8970
8998 - (int)setExternalAudioSource:(BOOL)enabled
8999 sampleRate:(NSInteger)sampleRate
9000 channels:(NSInteger)channels
9001 localPlayback:(BOOL)localPlayback
9002 publish:(BOOL)publish NS_SWIFT_NAME(setExternalAudioSource(_:sampleRate:channels:localPlayback:publish:)) __deprecated_msg("use createCustomAudioTrack:config: instead.");
9003
9004 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
9005
9014 - (int)setSpeakerphoneVolume:(NSUInteger)volume NS_SWIFT_NAME(setSpeakerphoneVolume(_:)) __deprecated_msg("use setDeviceVolume:volume: instead.");
9015
9016 - (int)startScreenCapture:(NSUInteger)windowId
9017 withCaptureFreq:(NSInteger)captureFreq
9018 bitRate:(NSInteger)bitRate
9019 andRect:(CGRect)rect NS_SWIFT_NAME(startScreenCapture(_:withCaptureFreq:bitRate:andRect:)) __deprecated_msg("use startScreenCaptureByWindowId:regionRect:captureParams: instead.");
9020 #endif
9021
9027 + (NSString * _Nonnull)getMediaEngineVersion NS_SWIFT_NAME(getMediaEngineVersion()) __deprecated;
9028
9029
9048 - (int)setVideoResolution:(CGSize)size andFrameRate:(NSInteger)frameRate bitrate:(NSInteger)bitrate NS_SWIFT_NAME(setVideoResolution(_:andFrameRate:bitrate:)) __deprecated_msg("use setVideoEncoderConfiguration: instead.");
9049
9058 - (void)leaveChannelBlock:(void(^ _Nullable)(AgoraChannelStats * _Nonnull stat))leaveChannelBlock NS_SWIFT_NAME(leaveChannelBlock(_:)) __deprecated_msg("use delegate instead.");
9059
9076 - (int)setLocalRenderMode:(NSUInteger)uid
9077 mode:(AgoraVideoRenderMode)mode NS_SWIFT_NAME(setLocalRenderMode(_:mode:)) __deprecated;
9078
9089 - (int)enableExternalAudioSourceLocalPlayback:(BOOL)enable NS_SWIFT_NAME(enableExternalAudioSourceLocalPlayback(_:)) __deprecated;;
9090
9091 - (int)startMultipleVideoStreams:(VIEW_CLASS * _Nonnull)view screen:(VIEW_CLASS * _Nonnull)screenView remotes:(NSArray * _Nullable)remoteViews NS_SWIFT_NAME(startMultipleVideoStreams(_:screen:remotes:)) __deprecated;;
9092
9098 - (void)addDelegate:(id<AgoraRtcEngineDelegate> _Nonnull)delegate NS_SWIFT_NAME(addDelegate(_:));
9099
9105 - (void)removeDelegate:(id<AgoraRtcEngineDelegate> _Nonnull)delegate NS_SWIFT_NAME(removeDelegate(_:));
9106
9107 @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.