API Overview

Agora provides a flexible combination of APIs deployed globally to deliver reliable real-time audio and video communication.

Initialization

API Description
create [1/2] Creates and initializes a RtcEngine instance.
create [2/2] Creates and initializes a RtcEngine instance.
addHandler Adds an event handler.
destroy [2/2] Destroys the RtcEngine instance and releases related resources.
destroy [1/2] Releases the RtcEngine instance.
removeHandler Removes the specified IRtcEngineEventHandler instance.
onEngineReleased Callback triggered when RtcEngine is released.

Channel Management

API Description
setChannelProfile Sets the channel profile.
joinChannel [1/2] Joins a channel.
joinChannel [2/2] Joins a channel and sets media options.
joinChannelEx Joins a channel.
updateChannelMediaOptions Updates channel media options after joining a channel.
updateChannelMediaOptionsEx Updates the channel media options after joining a channel.
leaveChannel [1/2] Leaves the channel.
leaveChannel [2/2] Sets channel options and leaves the channel.
leaveChannelEx [1/2] Leaves a channel.
leaveChannelEx [2/2] Sets channel parameters and leaves the channel.
preloadChannel Preloads the specified channel to reduce the time it takes for a viewer to join the channel.
updatePreloadChannelToken Updates the wildcard token used for preloading a channel.
renewToken Updates the Token.
setClientRole [1/2] Sets the user role of the client instance.
setClientRole [2/2] Sets the user role and audience latency level in live streaming.
getUserInfoByUidEx Gets the user information by user ID.
getUserInfoByUserAccountEx Gets user information by user account.
onClientRoleChanged Callback triggered when the user role or audience latency level changes.
onClientRoleChangeFailed Callback triggered when switching user roles fails.
onError Callback triggered when an error occurs during SDK runtime.
onJoinChannelSuccess Callback triggered when a remote user successfully joins a channel.
onLeaveChannel Callback triggered when a user leaves a channel.
onRejoinChannelSuccess Callback triggered when a user rejoins a channel.
onRenewTokenResult renewToken result callback.
onRequestToken Token expiration callback.
onRtcStats Callback that reports statistics of the current call.
onTokenPrivilegeWillExpire Callback triggered when the token is about to expire in 30 seconds.
onUserJoined Callback triggered when a remote user or broadcaster joins the channel.
onUserOffline Callback triggered when a remote user or host leaves the channel.

Publish and Subscribe

API Description
muteAllRemoteAudioStreams Stops or resumes subscribing to all remote users' audio streams.
muteAllRemoteAudioStreamsEx Stops or resumes subscribing to all remote users' audio streams.
muteAllRemoteVideoStreams Stops or resumes subscribing to all remote users' video streams.
muteAllRemoteVideoStreamsEx Stops or resumes subscribing to all remote users' video streams.
muteLocalAudioStream Stops or resumes publishing the locally captured audio stream.
muteLocalAudioStreamEx Stops or resumes publishing the local audio stream.
muteLocalVideoStream Stops or resumes publishing the local video stream.
muteLocalVideoStreamEx Stops or resumes publishing the local video stream.
muteRemoteAudioStream Stops or resumes subscribing to the audio stream of a specified remote user.
muteRemoteAudioStreamEx Stops or resumes receiving the audio stream of a specified user.
muteRemoteVideoStream Stops or resumes subscribing to the specified remote user's video stream.
muteRemoteVideoStreamEx Stops or resumes receiving the video stream of a specified user.
setDualStreamMode [1/2] Sets the video stream mode at the sender to control whether to send the low-quality stream.
setDualStreamMode [2/2] Sets the video stream mode configuration with different quality layers at the sender.
setDualStreamModeEx Sets the video stream mode on the sender side to control whether to send the low-quality video stream.
setRemoteDefaultVideoStreamType [1/2] Sets the default video stream type to subscribe to.
setRemoteVideoStreamType [1/2] Sets the type of video stream to subscribe to.
setRemoteVideoStreamTypeEx [1/2] Sets the type of video stream to subscribe to.
setRemoteVideoSubscriptionOptions Sets the options for subscribing to remote video streams.
setRemoteVideoSubscriptionOptionsEx Sets the options for subscribing to remote video streams.
setSubscribeAudioAllowlist Sets the audio stream subscription allowlist.
setSubscribeAudioAllowlistEx Sets the allowlist for audio stream subscription.
setSubscribeAudioBlocklist Sets the audio stream subscription blocklist.
setSubscribeAudioBlocklistEx Sets the blocklist for audio stream subscription.
setSubscribeVideoAllowlist Sets the video stream subscription allowlist.
setSubscribeVideoAllowlistEx Sets the allowlist for video stream subscription.
setSubscribeVideoBlocklist Sets the video stream subscription blocklist.
setSubscribeVideoBlocklistEx Sets the blocklist for video stream subscription.
onAudioPublishStateChanged Callback for audio publish state change.
onAudioSubscribeStateChanged Callback for audio subscription state change.
onVideoSubscribeStateChanged Callback for video subscription state change.

Audio Basic Features

API Description
adjustPlaybackSignalVolume Adjusts the local playback volume of all remote users.
adjustUserPlaybackSignalVolume Adjusts the playback volume of a specified remote user.
adjustUserPlaybackSignalVolumeEx Adjusts the playback volume of a specified remote user.
disableAudio Disables the audio module.
enableAudio Enables the audio module.
enableAudioVolumeIndication Enables the reporting of user volume indications.
enableAudioVolumeIndicationEx Enables reporting of user audio volume indications.
setAudioProfile [2/2] Sets the audio profile.
setAudioScenario Sets the audio scenario.
onActiveSpeaker Callback for the most active remote speaker.
onAudioVolumeIndication Callback that reports user volume information.
onFirstLocalAudioFramePublished Callback when the first local audio frame is published.
onLocalAudioStateChanged Callback for changes in local audio stream state.
onLocalAudioStats Callback for local audio stream statistics.
onRemoteAudioStateChanged Callback for remote audio state change.
onRemoteAudioStats Callback that reports transport-layer statistics of each remote audio stream.
onUserMuteAudio Callback when a remote user or host stops or resumes sending audio streams.

Audio Capture

API Description
adjustRecordingSignalVolume Adjusts the volume of the recorded audio signal.
enableInEarMonitoring [1/2] Enables or disables in-ear monitoring.
enableInEarMonitoring [2/2] Enables or disables the in-ear monitoring feature.
enableLocalAudio Enables or disables the local audio capture function.
muteRecordingSignal Sets whether to mute the recording signal.
setInEarMonitoringVolume Sets the in-ear monitoring volume.

Audio Effects

API Description
enableVoiceAITuner Enables or disables the Voice AI Tuner.
getAudioEffectManager Gets the IAudioEffectManager instance used to manage audio effect files.
setAdvancedAudioOptions Sets advanced audio options.
setAINSMode Enables or disables the AI noise reduction feature and sets the noise reduction mode.
setAudioEffectParameters Sets parameters for preset audio effects provided by the SDK.
setAudioEffectPreset Sets the SDK's preset audio effects.
setLocalVoiceEqualization Sets the local voice equalization effect.
setLocalVoiceFormant Sets the formant ratio to change the vocal timbre.
setLocalVoicePitch Sets the pitch of the local voice.
setLocalVoiceReverb Sets the reverb effect of the local voice.
setVoiceBeautifierParameters Sets parameters for preset voice beautifier effects.
setVoiceBeautifierPreset Sets the preset voice beautifier effect.
setVoiceConversionPreset Sets the SDK's preset voice conversion effects.

Stereo

API Description
enableSoundPositionIndication Enables or disables stereo panning for remote users.
setRemoteVoicePosition Sets the spatial position and volume of a remote user's voice.
setRemoteVoicePositionEx Sets the 2D position and volume of the remote user's voice.

Spatial Audio

API Description
initialize Initializes the ILocalSpatialAudioEngine.
clearRemotePositions Removes all spatial positions of remote users.
create Creates an ILocalSpatialAudioEngine instance.
enableSpatialAudio Enables or disables spatial audio.
muteAllRemoteAudioStreams Stops or resumes subscribing to all remote users’ audio streams.
muteLocalAudioStream Stops or resumes publishing the local audio stream.
muteRemoteAudioStream Stops or resumes subscribing to the specified remote user’s audio stream.
destroy Destroys the ILocalSpatialAudioEngine instance.
removeRemotePosition Removes the spatial position information of a specified remote user.
setAudioRecvRange Sets the local user’s audio reception range.
setDistanceUnit Sets the number of meters corresponding to each unit of distance in the game engine.
setHeadphoneEQParameters Sets the low and high frequency parameters of the headphone equalizer.
setHeadphoneEQPreset Sets the preset headphone equalizer effect.
setMaxAudioRecvCount Sets the maximum number of audio streams you can receive within the specified audio reception range.
setPlayerAttenuation Sets the sound attenuation properties of the media player.
setRemoteAudioAttenuation Sets the audio attenuation effect for a specified user.
setRemoteUserSpatialAudioParams Sets the spatial audio parameters for a remote user.
setSpatialAudioParams Enables or disables spatial audio for the media player.
setZones Sets sound insulation zones.
updatePlayerPositionInfo Updates the spatial position of the media player.
updateRemotePosition Updates the spatial position of a specified remote user.
updateSelfPosition Updates the local user's spatial position.

Audio Mixer

API Description
startLocalAudioMixer Starts local audio mixing.
stopLocalAudioMixer Stops local audio mixing.
updateLocalAudioMixerConfiguration Updates local audio mixing configuration.

Raw Audio Data

API Description
getEarMonitoringAudioParams Sets the data format for the onEarMonitoringAudioFrame callback.
getMixedAudioParams Sets the data format for the onMixedAudioFrame callback.
getObservedAudioFramePosition Sets the audio data observation position.
getPlaybackAudioParams Sets the data format for the onPlaybackAudioFrame callback.
getRecordAudioParams Sets the audio format for the onRecordAudioFrame callback.
registerAudioFrameObserver Registers an audio frame observer.
setEarMonitoringAudioFrameParameters Sets the format of the ear monitoring audio data.
setMixedAudioFrameParameters Sets the format of the mixed raw audio data used for capture and playback.
setPlaybackAudioFrameBeforeMixingParameters [1/2] Sets the format of raw audio playback data before audio mixing.
setPlaybackAudioFrameBeforeMixingParameters [2/2] Sets the format of audio data returned in the onPlaybackAudioFrameBeforeMixing callback.
setPlaybackAudioFrameParameters Sets the format of raw audio playback data.
setRecordingAudioFrameParameters Sets the format of the captured raw audio data.
onEarMonitoringAudioFrame Callback for ear monitoring audio frames.
onMixedAudioFrame Callback for retrieving the audio frame mixed from capture and playback.
onPlaybackAudioFrame Callback for retrieving the raw audio frame for playback.
onPlaybackAudioFrameBeforeMixing Callback for retrieving audio frames of subscribed remote users before audio mixing.
onRecordAudioFrame Callback for retrieving the captured audio frame.

Encoded Audio Data

API Description
registerAudioEncodedFrameObserver Registers an observer for encoded audio data.
onMixedAudioEncodedFrame Callback for mixed encoded audio data of the local and all remote users.
onPlaybackAudioEncodedFrame Callback for retrieving encoded audio data of all remote users.
onRecordAudioEncodedFrame Callback for encoded audio data of the local user.

Custom Audio Capture and Rendering

API Description
adjustCustomAudioPlayoutVolume Adjusts the volume of the custom audio track for local playback.
adjustCustomAudioPublishVolume Adjusts the volume of the custom audio track for remote playback.
createCustomAudioTrack Creates a custom audio track.
destroyCustomAudioTrack Destroys the specified audio track.
enableCustomAudioLocalPlayback Enables or disables local playback of external audio sources.
pullPlaybackAudioFrame [1/2] Pulls mixed remote audio data for playback.
pullPlaybackAudioFrame [2/2] Pulls remote audio data.
setExternalAudioSink Sets the external audio renderer.

Audio Spectrum

API Description
disableAudioSpectrumMonitor Disables audio spectrum monitoring.
enableAudioSpectrumMonitor Enables the audio spectrum monitoring feature.
registerAudioSpectrumObserver Registers an audio spectrum observer.
unRegisterAudioSpectrumObserver Unregisters the audio spectrum observer.
onLocalAudioSpectrum Callback for local audio spectrum data.
onRemoteAudioSpectrum Callback for remote audio spectrum data.

Video Basic Features

API Description
disableVideo Disables the video module.
enableLocalVideo Enables or disables local video capture.
enableVideo Enables the video module.
setVideoEncoderConfiguration Sets the encoder configuration for the local video.
setVideoEncoderConfigurationEx Sets the encoder configuration for the local video.
setVideoScenario Sets the video application scenario.
startPreview [1/2] Enables local video preview.
startPreview [2/2] Enables local video preview and specifies the video source for preview.
stopPreview [1/2] Stops local video preview.
stopPreview [2/2] Stops local video preview.
onFirstLocalVideoFrame Callback triggered when the first local video frame is displayed in the local view.
onFirstLocalVideoFramePublished Callback for the first local video frame published.
onFirstRemoteVideoFrame Callback for the first remote video frame displayed.
onLocalVideoEvent onLocalVideoEvent callback.
onLocalVideoStateChanged Callback for changes in local video stream state.
onLocalVideoStats Callback for local video stream statistics.
onRemoteVideoStateChanged Callback when the remote video state changes.
onRemoteVideoStats Callback that reports statistics of the video stream sent by each remote user.
onUserEnableVideo Callback when a remote user enables or disables the video module.
onUserMuteVideo Callback when the remote video state changes.
onVideoPublishStateChanged Callback for video publish state change.
onVideoSizeChanged Callback when the video size or rotation information of a specified user changes.

Camera Capture

API Description
startCameraCapture Starts video capture.
stopCameraCapture Stops camera capture.

Screen Capture

API Description
queryScreenCaptureCapability Queries the maximum supported frame rate for screen sharing on the device.
setExternalMediaProjection Configures an external MediaProjection for the SDK to capture screen video streams.
setScreenCaptureScenario Sets the screen sharing scenario.
startScreenCapture Starts screen capture.
stopScreenCapture Stops screen capture.
updateScreenCaptureParameters Updates the screen capture parameters.

Snapshot

API Description
enableContentInspect Enables or disables the local snapshot upload feature.
enableContentInspectEx Enables or disables local snapshot upload.
takeSnapshot [1/2] Captures a snapshot of the specified user's video stream and saves it as a JPG image.
takeSnapshot [2/2] Captures a video snapshot at the specified observation point.
takeSnapshotEx [1/2] Takes a snapshot of the video stream using the connection ID.
takeSnapshotEx [2/2] Takes a snapshot of a specified user's video using the connection ID.
onSnapshotTaken Callback for video snapshot result.

Virtual Background

API Description
enableVirtualBackground [1/2] Enables or disables the virtual background feature.
enableVirtualBackground [2/2] Enables virtual background and specifies the media source, or disables the virtual background.

Local Video Transcoding

API Description
startLocalVideoTranscoder Starts local video composition.
stopLocalVideoTranscoder Stops local composition.
updateLocalTranscoderConfiguration Updates local composition configuration.
onLocalVideoTranscoderError Callback for errors during local video mixing.

Video Enhancement

API Description
addOrUpdateVideoEffect Adds or updates a video effect for the specified video effect node ID and template.
createVideoEffectObject Creates an IVideoEffectObject video effect object.
destroyVideoEffectObject Destroys a video effect object.
getFaceShapeAreaOptions [1/2] Gets the current settings of the face beautification area.
getFaceShapeAreaOptions [2/2] Retrieves the current settings options for the beauty effect area.
getFaceShapeBeautyOptions [1/2] Gets the current beauty effect settings.
getFaceShapeBeautyOptions [2/2] Gets the current beauty effect settings.
getOptions Retrieves the currently configured watermark display options.
getVideoEffectBoolParam Retrieves the boolean parameter from the video effect.
getVideoEffectFloatParam Retrieves the float value of the specified parameter in the video effect.
getVideoEffectIntParam Retrieves the integer parameter from the video effect.
performVideoEffectAction Performs an action on the specified video effect node.
removeVideoEffect Removes the video effect node for the specified node ID.
setBeautyEffectOptions [1/2] Enables the beauty effect and sets its options.
setBeautyEffectOptions [2/2] Sets beauty effect options and specifies the media source.
setColorEnhanceOptions [1/2] Enables the color enhancement feature.
setColorEnhanceOptions [2/2] Sets color enhancement options and specifies the media source.
setFaceShapeAreaOptions [1/2] Sets beauty effect options for face areas and specifies the media source.
setFaceShapeAreaOptions [2/2] Sets the face area options for beauty enhancement.
setFaceShapeBeautyOptions [1/2] Sets face shaping effects and specifies the media source to apply.
setFaceShapeBeautyOptions [2/2] Sets face shaping options.
setFilterEffectOptions [1/2] Sets filter effect parameters and specifies the media source.
setFilterEffectOptions [2/2] Sets filter effect options.
setLowlightEnhanceOptions [1/2] Enables low-light enhancement.
setLowlightEnhanceOptions [2/2] Sets low-light enhancement options and specifies the media source.
setVideoDenoiserOptions [1/2] Sets the video denoising feature and its options.
setVideoDenoiserOptions [2/2] Sets video denoising and specifies the media source.
setVideoEffectBoolParam Sets a boolean parameter for the video effect.
setVideoEffectFloatParam Sets a float parameter for the video effect.
setVideoEffectIntParam Sets an integer parameter for the video effect.

Face Detection

API Description
enableFaceDetection Enables or disables local user face detection.
onFacePositionChanged Reports local user's face detection result.

Watermark

API Description
addVideoWatermark [3/3] Adds a watermark image to the local video stream.
addVideoWatermarkEx [2/2] Adds a watermark image to the local video.
clearVideoWatermarkEx Removes watermark images from the video stream.
clearVideoWatermarks Removes watermark images from the video stream.
getBuffer Gets the data buffer of the watermark image.
getFormat Gets the format of the watermark image.
getHeight Gets the height of the watermark image.
getId Retrieves the unique identifier of the watermark.
getImageUrl Retrieves the URL of the watermark image.
getPositionInLandscapeMode Gets the watermark position in landscape mode.
getPositionInPortraitMode Gets the watermark position in portrait mode.
getType Retrieves the watermark type information in the current watermark configuration.
getWidth Gets the width of the watermark image.
getzOrder Gets the Z-order index of the watermark image.
isVisibleInPreview Checks whether the watermark is visible in the local video preview.
removeVideoWatermark Removes a watermark image from the local video.
removeVideoWatermarkEx Removes the specified watermark image from the local or remote video stream.

Image Source

API Description
enableVideoImageSource Sets whether to replace the current video with an image when publishing video streams.

Video Rendering

API Description
enableInstantMediaRendering Enables instant rendering of audio and video frames.
setLocalRenderMode [2/2] Updates the display mode of the local video view.
setLocalRenderTargetFps Sets the maximum frame rate for local video rendering.
setRemoteRenderModeEx Sets the video display mode of a specified remote user.
setRemoteRenderTargetFps Sets the maximum frame rate for rendering remote video.
setVideoRenderMode Sets the rendering mode of the media player.
setupLocalVideo Initializes the local video view.
setupRemoteVideo Initializes the remote video view.
setupRemoteVideoEx Initializes the video view of a remote user.
startMediaRenderingTracing Enables tracing of the video frame rendering process.
startMediaRenderingTracingEx Enables tracing of the video frame rendering process.
onTranscodedStreamLayoutInfo Callback for receiving a mixed video stream with layout information.
onVideoRenderingTracingResult Callback for video frame rendering events.

Raw Video Data

API Description
getMirrorApplied Callback triggered each time the SDK receives a video frame, used to determine whether to mirror the captured video.
getObservedFramePosition Sets the frame position for the video observer.
getRotationApplied getRotationApplied callback is triggered each time the SDK receives a video frame, used to determine whether to rotate the captured video.
getVideoFormatPreference Sets the format of the raw video data output by the SDK.
getVideoFrameProcessMode getVideoFrameProcessMode callback. Triggered each time the SDK receives a video frame, prompting you to set the processing mode.
registerVideoFrameObserver Registers the raw video frame observer object.
onCaptureVideoFrame Callback triggered when a video frame is captured by the local device.
onPreEncodeVideoFrame Callback triggered each time the SDK receives a video frame before encoding.
onRenderVideoFrame Callback triggered when a remote user sends a video frame.

Encoded Video Data

API Description
registerVideoEncodedFrameObserver Registers an observer object to receive encoded video frames.
onEncodedVideoFrameReceived Callback when the receiver receives a remote encoded video frame.

Custom Video Capture and Rendering

API Description
createCustomVideoTrack Creates a custom video track.
destroyCustomVideoTrack Destroys the specified video track.
isTextureEncodeSupported Checks whether Texture encoding is supported for video.
pushExternalVideoFrameById [1/2] Pushes external raw video frame to the SDK via video track.
pushExternalVideoFrameById [2/2] Pushes external raw video frame to the SDK via video track.
setExternalRemoteEglContext Sets the EGL context used to render remote video streams.
setExternalVideoSource Configures external video source.

Audio Mixing

API Description
adjustAudioMixingPlayoutVolume Adjusts the local playback volume of the audio mixing.
adjustAudioMixingPublishVolume Adjusts the audio mixing volume for publishing.
adjustAudioMixingVolume Adjusts the volume during audio mixing.
getAudioMixingCurrentPosition Gets the current playback position of the audio mixing (milliseconds).
getAudioMixingDuration Gets the duration of the audio mixing file (milliseconds).
getAudioMixingPlayoutVolume Gets the local playback volume of the audio mixing.
getAudioMixingPublishVolume Gets the audio mixing volume for publishing.
getAudioTrackCount Gets the audio track index of the current music file.
pauseAudioMixing Pauses the playback and audio mixing of the music file.
resumeAudioMixing Resumes the playback and audio mixing of the music file.
selectAudioTrack Selects the audio track to use during playback.
selectMultiAudioTrack Selects the audio tracks to play locally and to publish to the channel.
setAudioMixingDualMonoMode Sets the channel mode of the current audio file.
setAudioMixingPitch Sets the pitch of the local music file.
setAudioMixingPlaybackSpeed Sets the playback speed of the current audio file.
setAudioMixingPosition Sets the playback position of the audio mixing.
startAudioMixing [2/2] Starts playing a music file.
stopAudioMixing Stops playing the music file.
onAudioMixingPositionChanged Callback for music file playback progress.
onAudioMixingStateChanged Callback for changes in music file playback state.

Audio Effect Files

API Description
getEffectCurrentPosition Gets the current playback position of the specified audio effect file.
getEffectDuration Gets the duration of an audio effect file.
getEffectsVolume Gets the volume of the audio effects.
getVolumeOfEffect Gets the volume of the specified sound effect file.
pauseAllEffects Pauses all sound effects.
pauseEffect Pauses playback of the specified sound effect file.
playAllEffects Plays all sound effects.
playEffect [1/2] Plays the specified local or online audio effect file.
playEffect [2/2] Plays the specified local or online audio effect file.
playEffectEx [1/2] Plays the specified audio effect in the channel.
playEffectEx [2/2] Plays the specified audio effect in the channel.
preloadEffect [1/2] Preloads the specified audio effect file.
preloadEffect [2/2] Preloads the specified audio effect file into memory.
preloadEffectEx [1/2] Preloads the specified audio effect into the channel.
preloadEffectEx [2/2] Preloads the specified audio effect into the channel.
resumeAllEffects Resumes playback of all audio effect files.
resumeEffect Resumes playback of the specified audio effect.
setEffectPosition Sets the playback position of the audio effect file.
setEffectsVolume Sets the playback volume of audio effects.
setVolumeOfEffect Sets the playback volume of the specified sound effect file.
stopAllEffects Stops playback of all audio effects.
stopEffect Stops playback of the specified audio effect.
unloadEffect Releases the specified preloaded audio effect file.
onAudioEffectFinished Callback when local audio effect file finishes playing.

Rhythm Player

API Description
configRhythmPlayer Configures the virtual metronome.
startRhythmPlayer Enables the virtual metronome.
stopRhythmPlayer Disables the virtual metronome.
onRhythmPlayerStateChanged Callback for changes in virtual metronome state.

Media Player Initialization

API Description
createMediaPlayer Creates an IMediaPlayer object.
destroy Destroys the media player instance.
getMediaPlayerCacheManager Gets an IMediaPlayerCacheManager instance.

Media Resource Open

API Description
open [1/2] Opens a media resource.
open [2/2] Opens a media file via URI.
openWithMediaSource Opens a media file and configures the playback scenario.
preloadSrc Preloads a media resource.
switchSrc Switches the currently playing media resource.
unloadSrc Unloads a preloaded media resource.

Media Resource Playback and Rendering

API Description
selectAudioTrack Selects an audio track during playback.
setAudioDualMonoMode Sets the channel mode of the current audio file.
setAudioPitch Sets the pitch of the current media resource.
setLoopCount Sets the number of times the audio effect is looped.
setPlaybackSpeed Sets the playback speed of the current audio file.
setPlayerOption Sets media player options.
setPlayerOptionString Sets media player parameter options.
setView Sets the rendering view.

Media Player Control

API Description
adjustPlayoutVolume Adjusts the local playback volume.
adjustPublishSignalVolume Adjusts the volume of the media file for publishing.
mute Sets whether to mute the media file.
pause Pauses playback.
play Plays the media file.
playPreloadedSrc Plays a preloaded media resource.
resume Resumes media playback.
seek Jumps to a new playback position.
stop [1/2] Stops media track playback.
onSeek Callback triggered when the SDK seeks media resource data.

Media Player Information

API Description
getAudioBufferDelay Gets the audio buffer delay when playing media files.
getDuration Gets the duration of the media resource.
getMediaPlayerId Gets the ID of the media player.
getMute Reports whether the media resource is muted.
getPlayoutVolume Gets the local playback volume.
getPlayPosition Gets the current local playback progress.
getPlaySrc [1/2] Gets the path of the currently playing media resource.
getPublishSignalVolume Gets the volume of the media file for publishing.
getState Gets the current playback state.
getStreamCount Gets the number of media streams in the media resource.
getStreamInfo Gets detailed information about a media stream.
onPlayerPlaybackStats Callback reporting statistics of the playing media file.

Media Player Observer

API Description
registerAudioFrameObserver Registers an audio frame observer object.
registerPlayerObserver Registers a media player observer.
registerVideoFrameObserver Registers a video frame observer object.
unRegisterPlayerObserver Releases the media player observer.
onAudioVolumeIndication Callback reporting the media player's volume.
onFrame Callback triggered when the media player receives an audio frame.
onFrame Callback triggered when the media player receives a video frame.
onMetaData Callback triggered when media metadata is received.
onPlayBufferUpdated onPlayBufferUpdated callback: Reports the duration that buffered data can support playback.
onPlayerEvent Player event callback.
onPlayerInfoUpdated Callback when media player-related information changes.
onPlayerStateChanged Callback for playback state changes.
onPlayerSrcInfoChanged Callback for video bitrate changes of the media resource.
onPositionChanged Playback progress callback.
onPreloadEvent Preload media resource event callback.
onReadData Callback triggered when the SDK reads media resource data.

Media Player Cache

API Description
enableAutoRemoveCache Sets whether to automatically delete cached media files.
getCacheDir Gets the storage path of cached media files.
getCacheFileCount Gets the number of cached media files.
getMaxCacheFileCount Gets the maximum number of media files that can be cached.
getMaxCacheFileSize Gets the maximum total storage size for cached media files.
removeAllCaches Deletes all cached media files in the media player.
removeCacheByUri Deletes a cached media file.
removeOldCache Deletes the least used cached media file.
setCacheDir Sets the storage path for cached media files.
setMaxCacheFileCount Sets the maximum number of media files that can be cached.
setMaxCacheFileSize Sets the maximum total storage size for cached media files.
onPlayerCacheStats Callback reporting statistics of cached media files.

Digital Rights Management

API Description
createMusicPlayer Creates a music player.
destroy Destroys the IAgoraMusicContentCenter instance.
destroyMusicPlayer Destroys the music player object.
getCaches Retrieves information about cached music resources.
getInternalSongCode Creates an internal identifier for a music resource's chorus segment.
getLyric Retrieves the download link for the lyrics of a music resource.
getMusicCharts Retrieves all music charts.
getMusicCollectionByMusicChartId [1/2] Retrieves the music resource list by music chart ID.
getMusicCollectionByMusicChartId [2/2] Retrieves the music resource list by music chart ID.
getPlaySrc [2/2] Gets the identifier or URL of the currently playing music resource.
getSongSimpleInfo Retrieves detailed information about a specific music resource.
initialize Initializes the IAgoraMusicContentCenter.
isPreloaded Checks whether the specified music resource is preloaded.
open [2/2] Opens a music resource using a URL.
open [1/2] Opens a music resource using the resource ID.
preload [2/2] Preloads copyright music resources.
registerEventHandler Registers callback events for the copyright music content center.
removeCache Deletes cached music resources.
renewToken Updates the Token.
searchMusic [1/2] Searches for music resources.
searchMusic [2/2] Searches for music resources.
setPlayMode Sets the playback mode of the music track.
stop [2/2] Stops playing the music resource.
unregisterEventHandler Unregisters the callback event for the copyright music content center.
onLyricResult Callback for lyric download URL.
onMusicChartsResult Callback after retrieving music charts.
onMusicCollectionResult Callback for retrieving the music resource list.
onPreLoadEvent Callback for music resource preload events.
onSongSimpleInfoResult Callback for retrieving detailed music resource information.

Recording

API Description
createMediaRecorder Creates a recorder instance for audio and video recording.
destroyMediaRecorder Destroys the audio and video recorder instance.
setMediaRecorderObserver Registers a callback observer for audio and video recording.
startAudioRecording [1/2] Starts client-side audio recording.
startAudioRecording [2/2] Starts client-side recording and applies recording configuration.
startRecording Starts recording audio and video streams.
stopAudioRecording Stops client-side audio recording.
stopRecording Stops recording audio and video streams.
onRecorderInfoUpdated Callback when recording information is updated.
onRecorderStateChanged Callback when the recording state changes.

Cross-Channel Media Relay

API Description
pauseAllChannelMediaRelay Pauses media stream relay to all destination channels.
resumeAllChannelMediaRelay Resumes media stream relay to all destination channels.
resumeAllChannelMediaRelayEx Resumes media stream relay to all destination channels.
startOrUpdateChannelMediaRelay Starts or updates media stream relay across channels.
startOrUpdateChannelMediaRelayEx Starts or updates media stream relay across channels.
stopChannelMediaRelay Stops media stream relay across channels.
stopChannelMediaRelayEx Stops media stream relay across channels.
onChannelMediaRelayStateChanged Callback when the state of media relay across channels changes.

Media Push

API Description
startRtmpStreamWithoutTranscoding Starts pushing audio and video streams to the CDN without transcoding.
startRtmpStreamWithoutTranscodingEx Starts pushing the media stream to the CDN without transcoding.
startRtmpStreamWithTranscoding Starts live streaming with transcoding configuration.
startRtmpStreamWithTranscodingEx Starts CDN streaming with transcoding configuration.
stopRtmpStream Stops pushing media streams to the specified CDN URL.
stopRtmpStreamEx Stops pushing media streams to the specified CDN address.
updateRtmpTranscoding Updates the transcoding configuration for live streaming.
updateRtmpTranscodingEx Updates the transcoding configuration for CDN streaming.
onRtmpStreamingEvent Callback for RTMP streaming events.
onRtmpStreamingStateChanged Callback for RTMP streaming state changes.
onTranscodingUpdated Callback for updates to publisher's cloud transcoding configuration.

CDN Streaming

API Description
onDirectCdnStreamingStateChanged Callback for changes in CDN streaming state.
onDirectCdnStreamingStats Callback for reporting CDN streaming statistics.

Data Stream

API Description
createDataStream [1/2] Creates a data stream to improve reliability and ordering of data transmission.
createDataStream [2/2] Creates a data stream.
createDataStreamEx [2/2] Creates a data stream.
sendStreamMessage Sends a data stream message.
sendStreamMessageEx Sends data stream messages.
onStreamMessage Callback when a remote user sends a data stream.
onStreamMessageError onStreamMessageError callback: triggered when the local user fails to receive a data stream sent by a remote user.

Metadata (SEI)

API Description
getMaxMetadataSize Callback triggered when the SDK requests the maximum metadata size.
registerMediaMetadataObserver Registers a metadata observer.
unregisterMediaMetadataObserver Unregisters the specified metadata observer.
onMetadataReceived Callback triggered when the local user receives metadata.
onReadyToSendMetadata Callback triggered when the SDK is ready to send metadata.

Audio Route

API Description
isSpeakerphoneEnabled Checks whether the speaker is enabled for audio playback.
setDefaultAudioRoutetoSpeakerphone Sets the default audio playback route.
setEnableSpeakerphone Sets whether to switch the audio route to the speaker.
setRouteInCommunicationMode Sets the audio playback route in communication audio mode.
onAudioRouteChanged Callback when the local audio route changes.

Video Device Management

API Description
getCameraMaxZoomFactor Gets the maximum zoom factor supported by the camera.
isCameraAutoFocusFaceModeSupported Checks whether the device supports face auto-focus.
isCameraExposurePositionSupported Checks whether the device supports manual exposure.
isCameraExposureSupported Checks whether the current camera supports adjusting exposure.
isCameraFaceDetectSupported Checks whether the device camera supports face detection.
isCameraFocusSupported Checks whether the device supports manual focus.
isCameraTorchSupported Checks whether the device supports camera torch.
isCameraZoomSupported Checks whether the device supports camera zoom.
queryCameraFocalLengthCapability Queries the focal length capabilities supported by the camera.
queryCodecCapability Queries the SDK's video codec capabilities.
setCameraAutoFocusFaceModeEnabled Enables or disables camera face auto-focus.
setCameraCapturerConfiguration Sets the camera capture configuration.
setCameraExposureFactor Sets the camera exposure value.
setCameraExposurePosition Sets the camera exposure position.
setCameraFocusPositionInPreview Sets the manual focus position of the camera.
setCameraTorchOn Turns the camera flash on or off.
setCameraZoomFactor Sets the camera zoom factor.
switchCamera [1/2] Switches between front and rear cameras.
switchCamera [2/2] Switches cameras by camera ID.
onCameraExposureAreaChanged Callback for when the camera exposure area changes.
onCameraFocusAreaChanged Callback for when the camera focus area changes.

Audio Device Management

API Description
getAudioDeviceInfo Gets audio device information.
startPlaybackDeviceTest Starts local audio playback device test.
startRecordingDeviceTest Starts the audio recording device test.
stopPlaybackDeviceTest Stops audio playback device test.
stopRecordingDeviceTest Stops the audio recording device test.

Extensions

API Description
addExtension Adds an extension.
enableExtension Enables or disables an extension feature.
getExtensionProperty [1/2] Gets detailed information of an extension component.
getExtensionProperty [2/2] Gets detailed information of an extension component.
registerExtension Registers an extension.
setExtensionProperty Sets the properties of an extension component.
setExtensionProviderProperty Sets the properties of the extension provider.
onErrorWithContext Callback triggered when an error occurs during extension runtime.
onEventWithContext Extended event callback.
onStartedWithContext Callback for successful extension enablement.
onStoppedWithContext Callback triggered when the extension is disabled.

Network and Others

API Description
complain Allows you to report call quality issues after the call ends.
enableEncryption Enables or disables the built-in encryption feature.
enableEncryptionEx Enables or disables built-in encryption.
getCallId Gets the current call ID.
getCallIdEx Gets the call ID corresponding to the connection ID.
getConnectionState Gets the current connection state of the SDK.
getConnectionStateEx Gets the current connection state of the SDK.
getCurrentMonotonicTimeInMs Gets the current monotonic time of the SDK.
getErrorDescription Gets the description of a warning or error code.
getNativeHandle Gets the native C++ handle of the SDK.
getNetworkType Gets the local network connection type.
getNtpWallTimeInMs Retrieves the current NTP (Network Time Protocol) time.
getSdkVersion Gets the SDK version.
isFeatureAvailableOnDevice Checks whether the current device supports the specified advanced feature.
queryDeviceScore Queries the device score.
rate Allows users to rate the call after it ends.
sendCustomReportMessage Reports a custom message.
sendCustomReportMessageEx Supports reporting and analyzing custom messages.
setAVSyncSource Sets the audio-video sync source on the publishing end.
setCloudProxy Sets the cloud proxy service.
setLocalAccessPoint Configures connection to the Agora private media server access module.
setParameters Provides technical preview features or special customization for the SDK through configured JSON options.
setRemoteSubscribeFallbackOption [1/2] Sets the fallback option for the subscribed video stream based on network conditions.
startEchoTest Starts audio and video device loop test.
startLastmileProbeTest Starts the last-mile network probe test.
stopEchoTest Stops the audio call test.
stopLastmileProbeTest Stops the last-mile network probe test.
onConnectionLost onConnectionLost callback: Triggered when the SDK fails to reconnect to the Agora edge server within 10 seconds after connection is lost.
onConnectionStateChanged Callback for network connection state changes.
onEncryptionError Callback for built-in encryption errors.
onLastmileProbeResult Callback for uplink and downlink Last-mile network probe test results.
onLastmileQuality Callback for the local user's Last-mile network quality.
onMultipathStats Callback for multipath transmission statistics.
onNetworkQuality onNetworkQuality callback. Reports the Last-mile network quality of each user in the channel.
onNetworkTypeChanged Callback when the local network type changes.
onPermissionError Callback triggered when device permission acquisition fails.
onPermissionGranted onPermissionGranted callback. Used to report granted permissions.
onProxyConnected Callback for proxy connection status.
onRemoteSubscribeFallbackToAudioOnly onRemoteSubscribeFallbackToAudioOnly callback. Triggered when the remote media stream switches between audio and video due to network changes.
onUplinkNetworkInfoUpdated Callback for uplink network information changes.