API Overview

Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through SD-RTN™.

Initialization related

Method / Callback Description
createAgoraRtcEngine Creates one IRtcEngine object.
initialize Initializes IRtcEngine.
release Releases the IRtcEngine instance.

Channel related

Method / Callback Description
setChannelProfile Sets the channel profile.
joinChannel [1/2] Joins a channel.
joinChannel [2/2] Joins a channel with media options.
joinChannelEx Joins a channel with the connection ID.
updateChannelMediaOptions Updates the channel media options after joining the channel.
updateChannelMediaOptionsEx Updates the channel media options after joining the channel.
leaveChannel [1/2] Leaves a channel.
leaveChannelEx [1/2] Leaves a channel.
leaveChannel [2/2] Sets channel options and leaves the channel.
leaveChannelEx [2/2] Sets channel options and leaves the channel.
preloadChannel [1/2] Preloads a channel with token, channelId, and uid.
preloadChannel [2/2] Preloads a channel with token, channelId, and userAccount.
updatePreloadChannelToken Updates the wildcard token for preloading channels.
renewToken Renews the token.
setClientRole [1/2] Sets the client role.
setClientRole [2/2] Sets the user role and level in an interactive live streaming channel.
onJoinChannelSuccess Occurs when a user joins a channel.
onRejoinChannelSuccess Occurs when a user rejoins the channel.
onClientRoleChanged Occurs when the user role switches during the interactive live streaming.
onClientRoleChangeFailed Occurs when the user role switching fails in the interactive live streaming.
onLeaveChannel Occurs when a user leaves a channel.
onUserJoined Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) joins the channel.
onUserOffline Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel.
onNetworkTypeChanged Occurs when the local network type changes.
onUplinkNetworkInfoUpdated Occurs when the uplink network information changes.
onConnectionLost Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
onConnectionStateChanged Occurs when the network connection state changes.
onRequestToken Occurs when the token expires.
onTokenPrivilegeWillExpire Occurs when the token expires in 30 seconds.
onError Reports an error during SDK runtime.

Publish and subscription

Method / Callback Description
muteLocalAudioStream Stops or resumes publishing the local audio stream.
muteLocalAudioStreamEx Stops or resumes publishing the local audio stream.
muteRemoteAudioStream Stops or resumes subscribing to the audio stream of a specified user.
muteRemoteAudioStreamEx Stops or resumes receiving the audio stream of a specified user.
muteAllRemoteAudioStreams Stops or resumes subscribing to the audio streams of all remote users.
muteAllRemoteAudioStreamsEx Stops or resumes subscribing to the audio streams of all remote users.
muteLocalVideoStream Stops or resumes publishing the local video stream.
muteLocalVideoStreamEx Stops or resumes publishing the local video stream.
muteRemoteVideoStream Stops or resumes subscribing to the video stream of a specified user.
muteRemoteVideoStreamEx Stops or resumes receiving the video stream of a specified user.
muteAllRemoteVideoStreams Stops or resumes subscribing to the video streams of all remote users.
muteAllRemoteVideoStreamsEx Stops or resumes subscribing to the video streams of all remote users.
setRemoteVideoSubscriptionOptions Options for subscribing to remote video streams.
setRemoteVideoSubscriptionOptionsEx Options for subscribing to remote video streams.
setSubscribeAudioBlocklist Set the blocklist of subscriptions for audio streams.
setSubscribeAudioBlocklistEx Set the blocklist of subscriptions for audio streams.
setSubscribeAudioAllowlist Sets the allowlist of subscriptions for audio streams.
setSubscribeAudioAllowlistEx Sets the allowlist of subscriptions for audio streams.
setSubscribeVideoBlocklist Set the blocklist of subscriptions for video streams.
setSubscribeVideoBlocklistEx Set the blocklist of subscriptions for video streams.
setSubscribeVideoAllowlist Set the allowlist of subscriptions for video streams.
setSubscribeVideoAllowlistEx Set the allowlist of subscriptions for video streams.
onAudioPublishStateChanged Occurs when the audio publishing state changes.
onAudioSubscribeStateChanged Occurs when the audio subscribing state changes.
onVideoSubscribeStateChanged Occurs when the video subscribing state changes.

Audio basic functions

Method / Callback Description
adjustUserPlaybackSignalVolume Adjusts the playback signal volume of a specified remote user.
adjustUserPlaybackSignalVolumeEx Adjusts the playback signal volume of a specified remote user.
adjustPlaybackSignalVolume Adjusts the playback signal volume of all remote users.
enableAudio Enables the audio module.
disableAudio Disables the audio module.
enableAudioVolumeIndication Enables the reporting of users' volume indication.
enableAudioVolumeIndicationEx Enables the reporting of users' volume indication.
setAudioProfile [2/2] Sets the audio parameters and application scenarios.
setAudioScenario Sets audio scenarios.
setAudioSessionOperationRestriction Sets the operational permission of the SDK on the audio session.
onAudioVolumeIndication Reports the volume information of users.
onActiveSpeaker Occurs when the most active remote speaker is detected.
onLocalAudioStateChanged Occurs when the local audio stream state changes.
onFirstLocalAudioFramePublished Occurs when the first audio frame is published.
onFirstRemoteAudioFrame Occurs when the SDK receives the first audio frame from a specific remote user.
onUserMuteAudio Occurs when a remote user (in the communication profile) or a host (in the live streaming profile) stops/resumes sending the audio stream.
onRemoteAudioStateChanged Occurs when the remote audio state changes.
onLocalAudioStats Reports the statistics of the local audio stream.
onRemoteAudioStats Reports the transport-layer statistics of each remote audio stream.
onReceiveAudioPacket Occurs when the local user receives an audio packet.
onSendAudioPacket Occurs when the local user sends an audio packet.

Audio capture

Method / Callback Description
enableLocalAudio Enables or disables the local audio capture.
enableLoopbackRecording Enables loopback audio capturing.
enableLoopbackRecordingEx Enables loopback audio capturing.
adjustRecordingSignalVolume Adjusts the capturing signal volume.
adjustLoopbackSignalVolume Adjusts the volume of the signal captured by the sound card.
muteRecordingSignal Whether to mute the recording signal.
getAudioDeviceInfo Gets the audio device information.
enableInEarMonitoring Enables in-ear monitoring.
setInEarMonitoringVolume Sets the volume of the in-ear monitor.

Audio pre-processing and post-processing

Method / Callback Description
setAdvancedAudioOptions Sets audio advanced options.
setAINSMode Sets whether to enable the AI ​​noise suppression function and set the noise suppression mode.
setLocalVoiceEqualization Sets the local voice equalization effect.
setLocalVoicePitch Changes the voice pitch of the local speaker.
setLocalVoiceReverb Sets the local voice reverberation.
setVoiceBeautifierPreset Sets a preset voice beautifier effect.
setVoiceBeautifierParameters Sets parameters for the preset voice beautifier effects.
setAudioEffectPreset Sets an SDK preset audio effect.
setAudioEffectParameters Sets parameters for SDK preset audio effects.
setVoiceConversionPreset Sets a preset voice beautifier effect.
setLocalVoiceFormant Set the formant ratio to change the timbre of human voice.
enableSoundPositionIndication Enables or disables stereo panning for remote users.
setRemoteVoicePosition Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
setRemoteVoicePositionEx Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
initialize Initializes ILocalSpatialAudioEngine.
updateSelfPosition Updates the spatial position of the local user.
updateRemotePosition Updates the spatial position of the specified remote user.
removeRemotePosition Removes the spatial position of the specified remote user.
clearRemotePositions Removes the spatial positions of all remote users.
setHeadphoneEQParameters Sets the low- and high-frequency parameters of the headphone equalizer.
setHeadphoneEQPreset Sets the preset headphone equalization effect.

Raw audio data

Method / Callback Description
registerAudioFrameObserver Registers an audio frame observer object.
setEarMonitoringAudioFrameParameters Sets the format of the in-ear monitoring raw audio data.
setRecordingAudioFrameParameters Sets the format of the captured raw audio data.
setPlaybackAudioFrameParameters Sets the audio data format for playback.
setMixedAudioFrameParameters Sets the audio data format reported by onMixedAudioFrame.
setPlaybackAudioFrameBeforeMixingParameters Sets the audio data format reported by onPlaybackAudioFrameBeforeMixing.
onEarMonitoringAudioFrame Gets the in-ear monitoring audio frame.
onRecordAudioFrame Gets the captured audio frame.
onPlaybackAudioFrame Gets the raw audio frame for playback.
onPlaybackAudioFrameBeforeMixing Retrieves the audio frame of a specified user before mixing.
onMixedAudioFrame Retrieves the mixed captured and playback audio frame.
getEarMonitoringAudioParams Sets the audio format for the onEarMonitoringAudioFrame callback.
getObservedAudioFramePosition Sets the frame position for the video observer.
getRecordAudioParams Sets the audio format for the onRecordAudioFrame callback.
getPlaybackAudioParams Sets the audio format for the onPlaybackAudioFrame callback.
getMixedAudioParams Sets the audio format for the onMixedAudioFrame callback.

Encoded audio data

Method / Callback Description
registerAudioEncodedFrameObserver Registers an encoded audio observer.
onRecordAudioEncodedFrame Gets the encoded audio data of the local user.
onPlaybackAudioEncodedFrame Gets the encoded audio data of all remote users.
onMixedAudioEncodedFrame Gets the mixed and encoded audio data of the local and all remote users.

Custom audio capture and renderer

Method / Callback Description
createCustomAudioTrack Creates a custom audio track.
destroyCustomAudioTrack Destroys the specified audio track.
setExternalAudioSink Sets the external audio sink.
pullAudioFrame Pulls the remote audio data.
pushAudioFrame Pushes the external audio frame.
adjustCustomAudioPlayoutVolume Adjusts the volume of the custom audio track played locally.
adjustCustomAudioPublishVolume Adjusts the volume of the custom audio track played remotely.
enableCustomAudioLocalPlayback Sets whether to enable the local playback of external audio source.

Audio spectrum

Method / Callback Description
registerAudioSpectrumObserver Register an audio spectrum observer.
enableAudioSpectrumMonitor Turns on audio spectrum monitoring.
disableAudioSpectrumMonitor Disables audio spectrum monitoring.
unregisterAudioSpectrumObserver Unregisters the audio spectrum observer.
onLocalAudioSpectrum Gets the statistics of a local audio spectrum.
onRemoteAudioSpectrum Gets the remote audio spectrum.

Video basic functions

Method / Callback Description
enableVideo Enables the video module.
disableVideo Disables the video module.
setVideoScenario Sets video application scenarios.
setVideoEncoderConfiguration Sets the video encoder configuration.
setVideoEncoderConfigurationEx Sets the video encoder configuration.
startPreview [1/2] Enables the local video preview.
stopPreview [1/2] Stops the local video preview.
startPreview [2/2] Enables the local video preview and specifies the video source for the preview.
stopPreview [2/2] Stops the local video preview.
onLocalVideoStateChanged Occurs when the local video stream state changes.
onLocalVideoStats Reports the statistics of the local video stream.
onFirstLocalVideoFramePublished Occurs when the first video frame is published.
onVideoPublishStateChanged Occurs when the video publishing state changes.
onVideoSizeChanged Occurs when the video size or rotation of a specified user changes.
onRemoteVideoStateChanged Occurs when the remote video stream state changes.
onRemoteVideoStats Reports the statistics of the video stream sent by each remote users.
onFirstLocalVideoFrame Occurs when the first local video frame is displayed on the local video view.
onFirstRemoteVideoFrame Occurs when the renderer receives the first frame of the remote video.
onFirstRemoteVideoDecoded Occurs when the first remote video frame is received and decoded.
onUserMuteVideo Occurs when a remote user stops or resumes publishing the video stream.
onUserEnableVideo Occurs when a remote user enables or disables the video module.

Video capture

Method / Callback Description
enableLocalVideo Enables/Disables the local video capture.
startCameraCapture Starts camera capture.
stopCameraCapture Stops camera capture.
onUserEnableLocalVideo Occurs when a specific remote user enables/disables the local video capturing function.

Screen Sharing

Method / Callback Description
getScreenCaptureSources Gets a list of shareable screens and windows. (For Windows and macOS only)
startScreenCaptureByWindowId Captures the whole or part of a window by specifying the window ID. (For Windows and macOS only)
startScreenCaptureByDisplayId Captures the screen by specifying the display ID. (For Windows and macOS only)
setScreenCaptureContentHint Sets the content hint for screen sharing. (For Windows and macOS only)
updateScreenCaptureRegion Updates the screen capturing region. (For Windows and macOS only)
queryScreenCaptureCapability Queries the highest frame rate supported by the device during screen sharing.(For Android and iOS only)
startScreenCapture [1/2] Starts screen capture.(For Android and iOS only)
startScreenCapture [2/2] Starts screen capture. (For Windows and macOS only)
updateScreenCapture Updates the screen capturing parameters.(For Android and iOS only)
updateScreenCaptureParameters Updates the screen capturing parameters. (For Windows and macOS only)
stopScreenCapture [1/2] Stops screen capture.
stopScreenCapture [2/2] Stops screen capture. (For Windows and macOS only)
getCount Gets the number of shareable windows and screens. (For Windows and macOS only)
getSourceInfo Gets information about the specified shareable window or screen. (For Windows and macOS only)
release Releases IScreenCaptureSourceList. (For Windows and macOS only)
setScreenCaptureScenario Sets the screen sharing scenario. (For Windows and macOS only)

Video pre-processing and post-processing

Method / Callback Description
takeSnapshot Takes a snapshot of a video stream.
takeSnapshotEx Takes a snapshot of a video stream.
enableVirtualBackground Enables/Disables the virtual background.
enableVideoImageSource Sets whether to replace the current video feeds with images when publishing video streams.
setBeautyEffectOptions Sets the image enhancement options.
setColorEnhanceOptions Sets color enhancement.
setLowlightEnhanceOptions Sets low-light enhancement.
setVideoDenoiserOptions Sets video noise reduction.
enableFaceDetection Enables or disables face detection for the local user.
onFacePositionChanged Reports the face detection result of the local user.
onSnapshotTaken Reports the result of taking a video snapshot.
addVideoWatermark [1/2] Adds a watermark image to the local video.
addVideoWatermark [2/2] Adds a watermark image to the local video.
addVideoWatermarkEx Adds a watermark image to the local video.
clearVideoWatermarks Removes the watermark image from the video stream.
clearVideoWatermarkEx Removes the watermark image from the video stream.

Video encoding

Method / Callback Description
setRemoteVideoStreamType Sets the video stream type to subscribe to.
setRemoteVideoStreamTypeEx Sets the video stream type to subscribe to.
setRemoteDefaultVideoStreamType Sets the default video stream type to subscribe to.
setDualStreamMode [1/2] Sets the dual-stream mode on the sender side.
setDualStreamMode [2/2] Sets dual-stream mode configuration on the sender side.
setDualStreamModeEx Sets the dual-stream mode on the sender side.
startLocalVideoTranscoder Starts the local video mixing.
stopLocalVideoTranscoder Stops the local video mixing.
updateLocalTranscoderConfiguration Updates the local video mixing configuration.
onLocalVideoTranscoderError Occurs when there's an error during the local video mixing.

Video rendering

Method / Callback Description
setRenderMode Sets the render mode of the media player.
setLocalRenderMode [2/2] Updates the display mode of the local video view.
setRemoteRenderMode Updates the display mode of the video view of a remote user.
setRemoteRenderModeEx Sets the video display mode of a specified remote user.
setView Sets the view.
setupLocalVideo Initializes the local video view.
setupRemoteVideo Initializes the video view of a remote user.
setupRemoteVideoEx Initializes the video view of a remote user.
enableInstantMediaRendering Enables audio and video frame instant rendering.
startMediaRenderingTracing Enables tracing the video frame rendering process.
startMediaRenderingTracingEx Enables tracing the video frame rendering process.
onTranscodedStreamLayoutInfo Occurs when the local user receives a mixed video stream carrying layout information.
onVideoRenderingTracingResult Video frame rendering event callback.

Raw video data

Method / Callback Description
registerVideoFrameObserver Registers a raw video frame observer object.
onCaptureVideoFrame Occurs each time the SDK receives a video frame captured by local devices.
onFrame Occurs each time the player receives a video frame.
onPreEncodeVideoFrame Occurs each time the SDK receives a video frame before encoding.
onRenderVideoFrame Occurs each time the SDK receives a video frame sent by the remote user.
getObservedFramePosition Sets the frame position for the video observer.
getVideoFrameProcessMode Occurs each time the SDK receives a video frame and prompts you to set the process mode of the video frame.
getMirrorApplied Occurs each time the SDK receives a video frame and prompts you whether or not to mirror the captured video.
getRotationApplied Occurs each time the SDK receives a video frame, and prompts you whether to rotate the captured video.
getVideoFormatPreference Sets the format of the raw video data output by the SDK.

Encoded video data

Method / Callback Description
registerVideoEncodedFrameObserver Registers a receiver object for the encoded video image.
onEncodedVideoFrameReceived Reports that the receiver has received the to-be-decoded video frame sent by the remote end.

Custom Video Source and Renderer

Method / Callback Description
createCustomVideoTrack Creates a custom video track.
destroyCustomVideoTrack Destroys the specified video track.
setExternalVideoSource Configures the external video source.
pushVideoFrame Pushes the external raw video frame to the SDK through video tracks.

Music file playback

Method / Callback Description
startAudioMixing [1/2] Starts playing the music file.
startAudioMixing [2/2] Starts playing the music file.
stopAudioMixing Stops playing and mixing the music file.
pauseAudioMixing Pauses playing and mixing the music file.
resumeAudioMixing Resumes playing and mixing the music file.
adjustAudioMixingVolume Adjusts the volume during audio mixing.
adjustAudioMixingPlayoutVolume Adjusts the volume of audio mixing for local playback.
adjustAudioMixingPublishVolume Adjusts the volume of audio mixing for publishing.
getAudioMixingPlayoutVolume Retrieves the audio mixing volume for local playback.
getAudioMixingPublishVolume Retrieves the audio mixing volume for publishing.
getAudioMixingDuration Retrieves the duration (ms) of the music file.
getAudioMixingCurrentPosition Retrieves the playback position (ms) of the music file.
setAudioMixingPitch Sets the pitch of the local music file.
setAudioMixingPosition Sets the audio mixing position.
setAudioMixingDualMonoMode Sets the channel mode of the current audio file.
getAudioTrackCount Gets the index of audio tracks of the current music file.
selectAudioTrack [1/2] Selects the audio track used during playback.
selectMultiAudioTrack Selects the audio tracks that you want to play on your local device and publish to the channel respectively.
onAudioMixingStateChanged Occurs when the playback state of the music file changes.
onAudioMixingPositionChanged Reports the playback progress of a music file.

Audio effect file playback

Method / Callback Description
getEffectsVolume Retrieves the volume of the audio effects.
setEffectsVolume Sets the volume of the audio effects.
getVolumeOfEffect Gets the volume of a specified audio effect file.
setVolumeOfEffect Sets the volume of a specified audio effect.
preloadEffect Preloads a specified audio effect file into the memory.
playEffect Plays the specified local or online audio effect file.
playAllEffects Plays all audio effect files.
pauseEffect Pauses a specified audio effect file.
pauseAllEffects Pauses all audio effects.
resumeEffect Resumes playing a specified audio effect.
resumeAllEffects Resumes playing all audio effect files.
stopEffect Stops playing a specified audio effect.
stopAllEffects Stops playing all audio effects.
unloadEffect Releases a specified preloaded audio effect from the memory.
unloadAllEffects Releases a specified preloaded audio effect from the memory.
getEffectDuration Retrieves the duration of the audio effect file.
getEffectCurrentPosition Retrieves the playback position of the audio effect file.
setEffectPosition Sets the playback position of an audio effect file.
onAudioEffectFinished Occurs when the playback of the local music file finishes.

Virtual metronome

Note:

This group of methods is for Android and iOS only.

Method / Callback Description
startRhythmPlayer Enables the virtual metronome.
stopRhythmPlayer Disables the virtual metronome.
configRhythmPlayer Configures the virtual metronome.
onRhythmPlayerStateChanged Occurs when the state of virtual metronome changes.

Media player

For more methods about the media player, see IMediaPlayer.

Method / Callback Description
createMediaPlayer Creates a media player instance.
getMediaPlayerCacheManager Gets one IMediaPlayerCacheManager instance.
IMediaPlayer This class provides media player functions and supports multiple instances.
IMediaPlayerCacheManager This class provides methods to manage cached media files.
IMediaPlayerSourceObserver Provides callbacks for media players.

Media player cache

Method / Callback Description
enableAutoRemoveCache Sets whether to delete cached media files automatically.
removeAllCaches Deletes all cached media files in the media player.
removeCacheByUri Deletes a cached media file.
removeOldCache Deletes a cached media file that is the least recently used.
setCacheDir Sets the storage path for the media files that you want to cache.
setMaxCacheFileCount Sets the maximum number of media files that can be cached.
setMaxCacheFileSize Sets the maximum size of the aggregate storage space for cached media files.
getCacheDir Gets the storage path of the cached media files.
getCacheFileCount Gets the number of media files that are cached.
getMaxCacheFileCount Gets the maximum number of media files that can be cached.
getMaxCacheFileSize Gets the maximum size of the aggregate storage space for cached media files.
onPlayerCacheStats Reports the statistics of the media file being cached.

Channel media stream relay

Method / Callback Description
startOrUpdateChannelMediaRelay Starts relaying media streams across channels or updates channels for media relay.
startOrUpdateChannelMediaRelayEx Starts relaying media streams across channels or updates channels for media relay.
stopChannelMediaRelay Stops the media stream relay. Once the relay stops, the host quits all the target channels.
stopChannelMediaRelayEx Stops the media stream relay. Once the relay stops, the host quits all the target channels.
pauseAllChannelMediaRelay Pauses the media stream relay to all target channels.
pauseAllChannelMediaRelayEx Pauses the media stream relay to all target channels.
resumeAllChannelMediaRelay Resumes the media stream relay to all target channels.
resumeAllChannelMediaRelayEx Resumes the media stream relay to all target channels.
onChannelMediaRelayStateChanged Occurs when the state of the media stream relay changes.

Media push

Method / Callback Description
startRtmpStreamWithoutTranscoding Starts pushing media streams to a CDN without transcoding.
startRtmpStreamWithoutTranscodingEx Starts pushing media streams to a CDN without transcoding.
startRtmpStreamWithTranscoding Starts Media Push and sets the transcoding configuration.
startRtmpStreamWithTranscodingEx Starts Media Push and sets the transcoding configuration.
updateRtmpTranscoding Updates the transcoding configuration.
updateRtmpTranscodingEx Updates the transcoding configuration.
stopRtmpStream Stops pushing media streams to a CDN.
stopRtmpStreamEx Stops pushing media streams to a CDN.
onRtmpStreamingEvent Reports events during the Media Push.
onRtmpStreamingStateChanged Occurs when the state of Media Push changes.
onTranscodingUpdated Occurs when the publisher's transcoding is updated.

Pushing streams to a CDN directly

Method / Callback Description
startDirectCdnStreaming Starts pushing media streams to the CDN directly.
stopDirectCdnStreaming Stops pushing media streams to the CDN directly.
setDirectCdnStreamingAudioConfiguration Sets the audio profile of the audio streams directly pushed to the CDN by the host.
setDirectCdnStreamingVideoConfiguration Sets the video profile of the media streams directly pushed to the CDN by the host.
onDirectCdnStreamingStateChanged Occurs when the CDN streaming state changes.
onDirectCdnStreamingStats Reports the CDN streaming statistics.

Data stream

Method / Callback Description
createDataStream [1/2] Creates a data stream.
createDataStream [2/2] Creates a data stream.
createDataStreamEx [2/2] Creates a data stream.
sendStreamMessage Sends data stream messages.
onStreamMessage Occurs when the local user receives the data stream from the remote user.
onStreamMessageError Occurs when the local user does not receive the data stream from the remote user.

Metadata (SEI)

Method / Callback Description
registerMediaMetadataObserver Registers the metadata observer.
unregisterMediaMetadataObserver Unregisters the specified metadata observer.
getMaxMetadataSize Occurs when the SDK requests the maximum size of the metadata.
onReadyToSendMetadata Occurs when the SDK is ready to send metadata.
onMetaData Occurs when the media metadata is received.
onMetadataReceived Occurs when the local user receives the metadata.

Audio route

This group of method is for Android and iOS only.

Method / Callback Description
setDefaultAudioRouteToSpeakerphone Sets the default audio playback route.
setEnableSpeakerphone Enables/Disables the audio route to the speakerphone.
setRouteInCommunicationMode Selects the audio playback route in communication audio mode.
isSpeakerphoneEnabled Checks whether the speakerphone is enabled.
onAudioRoutingChanged Occurs when the local audio route changes.

Mobile device management

This group of method is for Android and iOS only.

Method / Callback Description
enableMultiCamera Enables or disables multi-camera capture.(For iOS only)
switchCamera Switches between front and rear cameras.
setCameraCapturerConfiguration Sets the camera capture configuration.
isCameraZoomSupported Checks whether the device supports camera zoom.
getCameraMaxZoomFactor Gets the maximum zoom ratio supported by the camera.
setCameraZoomFactor Sets the camera zoom ratio.
isCameraTorchSupported Checks whether the device supports camera flash.
setCameraTorchOn Enables the camera flash.
isCameraFaceDetectSupported Checks whether the device camera supports face detection.
isCameraFocusSupported Check whether the device supports the manual focus function.
isCameraExposureSupported Queries whether the current camera supports adjusting exposure value.
setCameraExposureFactor Sets the camera exposure value.
setCameraFocusPositionInPreview Sets the camera manual focus position.
isCameraAutoFocusFaceModeSupported Checks whether the device supports the face auto-focus function.
setCameraAutoFocusFaceModeEnabled Enables the camera auto-face focus function.
isCameraExposurePositionSupported Checks whether the device supports manual exposure.
isCameraAutoExposureFaceModeSupported Checks whether the device supports auto exposure.(For iOS only)
setCameraExposurePosition Sets the camera exposure position.
setCameraAutoExposureFaceModeEnabled Sets whether to enable auto exposure.(For iOS only)
onCameraFocusAreaChanged Occurs when the camera focus area changes.
onCameraExposureAreaChanged Occurs when the camera exposure area changes.
queryCodecCapability Queries the current device's supported video codec capabilities.

Desktop audio device management

This group of methods is for Windows and macOS only.

Method / Callback Description
enumeratePlaybackDevices Enumerates the audio playback devices.
enumerateRecordingDevices Enumerates the audio capture devices.
followSystemPlaybackDevice Sets the audio playback device used by the SDK to follow the system default audio playback device.
followSystemRecordingDevice Sets the audio recording device used by the SDK to follow the system default audio recording device.
setPlaybackDevice Sets the audio playback device.
getPlaybackDevice Retrieves the audio playback device associated with the device ID.
getPlaybackDeviceInfo Retrieves the audio playback device information associated with the device ID and device name.
setLoopbackDevice Sets the loopback device.
getLoopbackDevice Gets the current loopback device.
followSystemLoopbackDevice Sets whether the loopback device follows the system default playback device.
setPlaybackDeviceVolume Sets the volume of the audio playback device. (For Windows only)
setRecordingDevice Sets the audio capture device.
getRecordingDevice Gets the current audio recording device.
getRecordingDeviceInfo Retrieves the information of the audio recording device.
setRecordingDeviceVolume Sets the volume of the audio capture device.
getRecordingDeviceVolume Retrieves the volume of the audio recording device. (For Windows only)
setPlaybackDeviceMute Mutes the audio playback device. (For Windows only)
getPlaybackDeviceMute Retrieves whether the audio playback device is muted. (For Windows only)
startPlaybackDeviceTest Starts the audio playback device test.
stopPlaybackDeviceTest Stops the audio playback device test.
startRecordingDeviceTest Starts the audio capturing device test.
stopRecordingDeviceTest Stops the audio capturing device test.
startAudioDeviceLoopbackTest Starts an audio device loopback test.
stopAudioDeviceLoopbackTest Stops the audio device loopback test.
release Releases all the resources occupied by the IAudioDeviceManager object. (For Windows only)
setDevice Specifies an audio device.
getDefaultDevice Gets the default audio device of the system.
getDevice Gets the information of a specified audio device.
getCount Gets the total number of audio playback or audio capture devices.
setApplicationVolume Sets the volume of the app.
getApplicationVolume Retrieves the volume of the app.
setApplicationMute Mutes/Unmutes the app.
isApplicationMute Checks whether the app is muted.
release Releases all the resources occupied by the IAudioDeviceCollection object.
onAudioDeviceStateChanged Occurs when the audio device state changes.
onAudioDeviceVolumeChanged Reports the volume change of the audio device or app.

Desktop video device management

This group of methods is for Windows and macOS only.

Method / Callback Description
enumerateVideoDevices Enumerates the video devices.
setDevice Specifies the video capture device with the device ID.
getDevice Retrieves the current video capture device.
release Releases all the resources occupied by the IVideoDeviceManager object.
getCapability Gets the detailed video frame information of the video capture device in the specified video format.
numberOfCapabilities Gets the number of video formats supported by the specified video capture device.
queryCodecCapability Queries the current device's supported video codec capabilities.
setCameraDeviceOrientation Sets the rotation angle of the captured video. (For Windows only)
setDevice Specifies a device with the device ID.
getDevice Gets a specified piece of information about an indexed video device.
getCount Gets the total number of the indexed video devices in the system.
release Releases all the resources occupied by the IVideoDeviceCollection object.
onVideoDeviceStateChanged Occurs when the video device state changes.

Extension

Method / Callback Description
enableExtension Enables or disables extensions.
loadExtensionProvider Adds an extension to the SDK.
setExtensionProperty Sets the properties of the extension.
setExtensionProviderProperty Sets the properties of the extension provider.
getExtensionProperty Gets detailed information on the extensions.
registerExtension Registers an extension.
onExtensionEvent The event callback of the extension.
onExtensionStarted Occurs when the extension is enabled.
onExtensionStopped Occurs when the extension is disabled.
onExtensionError Occurs when the extension runs incorrectly.

Network and others

Method / Callback Description
startEchoTest [1/3] Starts an audio call test.
startEchoTest [2/3] Starts an audio call test.
startEchoTest [3/3] Starts an audio device loopback test.
stopEchoTest Stops the audio call test.
startLastmileProbeTest Starts the last mile network probe test.
stopLastmileProbeTest Stops the last mile network probe test.
onLastmileQuality Reports the last-mile network quality of the local user.
onLastmileProbeResult Reports the last mile network probe result.
getCurrentMonotonicTimeInMs Gets the current Monotonic Time of the SDK.
queryDeviceScore Queries device score.
setCloudProxy Sets up cloud proxy service.
setParameters [1/2] Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.
getCallId Retrieves the call ID.
isFeatureAvailableOnDevice Checks whether the device supports the specified advanced feature.
rate Allows a user to rate a call after the call ends.
complain Allows a user to complain about the call quality after a call ends.
getConnectionState Gets the current connection state of the SDK.
getConnectionStateEx Gets the current connection state of the SDK.
getVersion Gets the SDK version.
getErrorDescription Gets the warning or error description.
queryInterface Gets the pointer to the specified interface.
getNetworkType Gets the type of the local network connection.
getNtpWallTimeInMs Gets the current NTP (Network Time Protocol) time.
enableEncryption Enables or disables the built-in encryption.
registerPacketObserver Registers a packet observer.
sendCustomReportMessage Reports customized messages.
sendCustomReportMessageEx Agora supports reporting and analyzing customized messages.
setRemoteSubscribeFallbackOption Sets the fallback option for the subscribed video stream based on the network conditions.
onReceiveVideoPacket Occurs when the local user receives a video packet.
onSendVideoPacket Occurs when the local user sends a video packet.
onRemoteSubscribeFallbackToAudioOnly Occurs when the remote media stream falls back to the audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve.
onEncryptionError Reports the built-in encryption errors.
onProxyConnected Reports the proxy connection state.
onNetworkQuality Reports the last mile network quality of each user in the channel.
onRtcStats Reports the statistics of the current call.
onPermissionError Occurs when the SDK cannot get the device permission.