For AI agents: see the complete documentation index at /llms.txt.
API sunset notice
Updated
Deprecated and removed APIs
This page lists the deprecated and removed APIs in the SDK and their suggested alternatives.
Deprecated APIs
A deprecated API is expected to be officially removed in about one year from deprecation. Agora recommends using the alternate API as soon as possible to avoid impacting your online business.
| Deprecated API | Description | Alternate API | Deprecating version |
|---|---|---|---|
startRhythmPlayer | Enables the virtual metronome. | - | v4.6.0 |
configRhythmPlayer | Configures the virtual metronome. | - | v4.6.0 |
onRhythmPlayerStateChanged | Occurs when the state of the virtual metronome changes. | - | v4.6.0 |
addVideoWatermarkEx [1/2] | Adds a watermark image to the local video. | Use addVideoWatermarkEx [2/2] instead. | v4.6.0 |
setRemoteSubscribeFallbackOption [1/2] | Sets the fallback option for the subscribed video stream based on the network conditions. | setRemoteSubscribeFallbackOption [2/2] | v4.4.0 |
setRemoteVideoStreamType [1/2] | Sets the type of the video stream to subscribe to. | setRemoteVideoStreamType [2/2] | v4.4.0 |
setRemoteDefaultVideoStreamType [1/2] | Sets the default video stream type to subscribe to. | setRemoteDefaultVideoStreamType [2/2] | v4.4.0 |
setRemoteVideoStreamTypeEx [1/2] | Sets the type of the video stream to subscribe to. | setRemoteVideoStreamTypeEx [2/2] | v4.4.0 |
destroy | Destroys the music player. | destroyMusicPlayer | v4.4.0 |
enableDualStreamMode [1/2] | Enables or disables dual-stream mode on the sender side. | setDualStreamMode [1/2] | v4.2.0 |
enableDualStreamMode [2/2] | Sets dual-stream mode and the low video stream on the sender side. | setDualStreamMode [2/2] | v4.2.0 |
enableDualStreamModeEx | Enables or disables dual-stream mode on the sender side. | setDualStreamModeEx | v4.2.0 |
enableWebSdkInteroperability | Enables interoperability with the Agora Web SDK, applicable only in live streaming scenarios. | - | v4.0.0 |
setExternalAudioSource [1/2] | Sets the external audio source. | createCustomAudioTrack | v4.0.0 |
setExternalAudioSource [2/2] | Sets the parameters of the external audio source. | createCustomAudioTrack | v4.0.0 |
createDataStreamEx [1/2] | Creates a data stream to provide more reliable and ordered data transmission. | createDataStreamEx [2/2] | v4.0.0 |
pushExternalVideoFrameById [1/2] | Pushes external raw video frames to the SDK through a video track. | pushExternalVideoFrameById [2/2] | v4.0.0 |
pushExternalVideoFrame [1/2] | Pushes external raw video frames to the SDK. | pushExternalVideoFrame [2/2] | v4.0.0 |
setLocalVideoMirrorMode | Sets the local video mirror mode. | setupLocalVideo or setLocalRenderMode [2/2] | v4.0.0 |
setLocalRenderMode [1/2] | Sets the display mode of the local video. | setLocalRenderMode [2/2] | v4.0.0 |
setLogFileSize | Sets the size of the SDK log file. | Use the config parameter in create [2/2]. | v4.0.0 |
setLogFilter | Sets the SDK log filter level. | Use the config parameter in create [2/2]. | v4.0.0 |
setLogFile | Sets the SDK log output file. | Use the config parameter in create [2/2]. | v4.0.0 |
setLogLevel | Sets the SDK log output level. | Use the config parameter in create [2/2]. | v4.0.0 |
setAudioProfile [1/2] | Sets the audio profile and audio scenario. | setAudioProfile [2/2] or setAudioScenario | v4.0.0 |
startAudioMixing [1/2] | Starts playing a music file. | startAudioMixing [2/2] | v4.0.0 |
preload [1/2] | Preloads music resources. | preload [2/2] | v4.0.0 |
addVideoWatermark [1/3] | Adds a watermark image to the local video. | addVideoWatermark [2/3] | v4.0.0 |
getBlue | Gets the blue component of the background color. | - | v4.0.0 |
getGreen | Gets the green component of the background color. | - | v4.0.0 |
getRed | Gets the red component of the background color. | - | v4.0.0 |
setBlue | Sets the blue component of the background color. | - | v4.0.0 |
setGreen | Sets the green component of the background color. | - | v4.0.0 |
setRed | Sets the red component of the background color. | - | v4.0.0 |
onAudioMixingFinished | Occurs when local music playback finishes. | onAudioMixingStateChanged | v4.0.0 |
onAudioQuality | Reports the statistics of the audio streams sent by each remote user. | onRemoteAudioStats | v4.0.0 |
onConnectionBanned | Occurs when the connection is banned by the Agora server. | onConnectionStateChanged | v4.0.0 |
onConnectionInterrupted | Occurs when the connection is interrupted. | onConnectionStateChanged | v4.0.0 |
onFirstRemoteAudioFrame | Occurs when the first remote audio frame is received. | onRemoteAudioStateChanged | v4.0.0 |
onFirstRemoteAudioDecoded | Occurs when the first remote audio frame is decoded. | onRemoteAudioStateChanged | v4.0.0 |
onRemoteAudioTransportStats | Reports the transport-layer statistics of each remote audio stream. | onRemoteAudioStats | v4.0.0 |
onRemoteVideoTransportStats | Reports the transport-layer statistics of each remote video stream. | onRemoteVideoStats | v4.0.0 |
onUserEnableLocalVideo | Occurs when a specified remote user enables or disables local video capture. | onRemoteVideoStateChanged | v4.0.0 |
onVideoStopped | Occurs when video playback stops. | onLocalVideoStateChanged | v4.0.0 |
Removed APIs
The following APIs have been removed from the SDK. Please use the recommended alternative to implement related functions.
| Removed API | Description | Alternate API | Deleting version |
|---|---|---|---|
setLocalPublishFallbackOption | Sets the fallback option for the published audio and video stream based on the network conditions. | - | v4.6.0 |
onLocalPublishFallbackToAudioOnly | Occurs when the local published stream falls back to audio-only. | - | v4.6.0 |
onDownlinkNetworkInfoUpdated | Occurs when the downlink network information changes. | - | v4.6.0 |
enableWirelessAccelerate | Enables or disables Wi-Fi acceleration. | - | v4.6.0 |
onWlAccStats | Reports Wi-Fi acceleration statistics. | - | v4.6.0 |
onWlAccMessage | Reports Wi-Fi acceleration messages. | - | v4.6.0 |
WlAccStats | Wi-Fi acceleration statistics. | - | v4.6.0 |
setVideoProfile | Sets the video encoder configuration. | setVideoEncoderConfiguration | v4.4.0 |
setRemoteRenderMode(userId, renderMode) | Sets the display mode of the remote view. | setRemoteRenderMode | v4.4.0 |
CreateRendererView | Creates a RendererView. | Use Android's native SurfaceView. | v4.4.0 |
CreateTextureView | Creates a TextureView. | Use Android's native TextureView. | v4.4.0 |
openWithCustomSource | Opens a custom media resource file. | openWithMediaSource | v4.4.0 |
startEchoTest() | Starts the voice call loop test. | startEchoTest | v4.4.0 |
startEchoTest(intervalInSeconds) | Starts the voice call loop test. | startEchoTest | v4.4.0 |
setEncryptionMode | Enables the built-in encryption scheme. | enableEncryption | v4.4.0 |
setEncryptionSecret | Enables built-in encryption and sets the data encryption password. | enableEncryption | v4.4.0 |
onEvent | Plugin event callback. | onEventWithContext | v4.4.0 |
onStarted | Occurs when the plugin is enabled. | onStartedWithContext | v4.4.0 |
onStopped | Occurs when the plugin is disabled. | onStoppedWithContext | v4.4.0 |
onError | Plugin error callback. | onErrorWithContext | v4.4.0 |
This page lists the deprecated and removed APIs in the SDK and their suggested alternatives.
Deprecated APIs
A deprecated API is expected to be officially removed in about one year from deprecation. Agora recommends using the alternate API as soon as possible to avoid impacting your online business.
| Deprecated API | Description | Alternate API | Deprecating version |
|---|---|---|---|
setDirectCdnStreamingAudioConfiguration(_:) | Sets the audio profile of the audio streams directly pushed to the CDN by the host. | Use Media Push instead. | v4.6.0 |
setDirectCdnStreamingVideoConfiguration(_:) | Sets the video profile of the media streams directly pushed to the CDN by the host. | Use Media Push instead. | v4.6.0 |
startDirectCdnStreaming(_:publishUrl:mediaOptions:) | Starts pushing media streams to the CDN directly. | Use Media Push instead. | v4.6.0 |
stopDirectCdnStreaming() | Stops pushing media streams to the CDN directly. | Use Media Push instead. | v4.6.0 |
onDirectCdnStreamingStateChanged(_:reason:message:) | CDN streaming state changed callback. | Use Media Push instead. | v4.6.0 |
AgoraDirectCdnStreamingMediaOptions | The media setting options for the host. | Use Media Push instead. | v4.6.0 |
AgoraDirectCdnStreamingStats | The statistics of the current CDN streaming. | Use Media Push instead. | v4.6.0 |
AgoraDirectCdnStreamingState | The current CDN streaming state. | Use Media Push instead. | v4.6.0 |
AgoraDirectCdnStreamingReason | Reasons for the changes in CDN streaming status. | Use Media Push instead. | v4.6.0 |
startRhythmPlayer(_:sound2:config:) | Enables the virtual metronome | - | v4.6.0 |
configRhythmPlayer(_:) | Configures the virtual metronome. | - | v4.6.0 |
rtcEngine(_:didRhythmPlayerStateChanged:reason:) | Occurs when the state of virtual metronome changes. | - | v4.6.0 |
addVideoWatermark(_:options:) | Adds a watermark image to the local video. | Use addVideoWatermarkWithImageUrl:options: instead. | v4.6.0 |
addVideoWatermarkEx(_:options:connection:) | Adds a watermark image to the local video. | Use addVideoWatermarkWithImageUrlEx:options:connection: instead. | v4.6.0 |
pushExternalAudioFrameSampleBuffer(_:) | Push external CMSampleBuffer audio frames. | pushExternalAudioFrameSampleBuffer(_:sampleRate:channels:trackId:) | v4.3.1 |
enableDualStreamMode(_:) | Sets the dual-stream mode on the sender side. | setDualStreamMode(_:) | v4.2.0 |
enableDualStreamMode(_:streamConfig:) | Sets dual-stream mode configuration on the sender side. | setDualStreamMode(_:streamConfig:) | v4.2.0 |
enableDualStreamModeEx(_:streamConfig:connection:) | Sets the dual-stream mode on the sender side. | setDualStreamModeEx(_:streamConfig:connection:) | v4.2.0 |
enableWebSdkInteroperability(_:) | Enables interoperability with the Agora Web SDK (applicable only in the live streaming use-cases). | - | v4.0.0 |
setLogFileSize(_:) | Set the size of the log file output by the SDK. | Use the logConfig parameter in sharedEngine(with:delegate:) | v4.0.0 |
setExternalAudioSource(_:sampleRate:channels:) | Set external audio acquisition parameters. | createCustomAudioTrack(_:config:) | v4.0.0 |
setExternalAudioSource(_:sampleRate:channels:localPlayback:publish:) | Set external audio acquisition parameters. | createCustomAudioTrack(_:config:) | v4.0.0 |
createDataStreamEx(_:reliable:ordered:connection:) | Create a data flow | createDataStreamEx(_:config:connection:) | v4.0.0 |
setLocalVideoMirrorMode(_:) | Set up local video mirroring. | setupLocalVideo(_:) or setLocalRenderMode(_:mirror:) | v4.0.0 |
setLogFile(_:) | Setting up log files. | Use the logConfig parameter in sharedEngine(with:delegate:) | v4.0.0 |
setAudioProfile(_:scenario:) | Set audio encoding properties and audio scene. | setAudioProfile(_:) or setAudioScenario(_:) | v4.0.0 |
preload(songCode:jsonOption:) | Preload music resources. | preload(songCode:) | v4.0.0 |
addVideoWatermark(_:) | Add local video watermark. | addVideoWatermark(_:options:) | v4.0.0 |
Removed APIs
The following APIs have been removed from the SDK. Please use the recommended alternative to implement related functions.
| Removed API | Description | Alternate API | Deleting version |
|---|---|---|---|
setLocalPublishFallbackOption(_:) | Sets the fallback option for the published video stream based on the network conditions. | v4.6.0 | |
rtcEngine(_:didLocalPublishFallbackToAudioOnly:) | Occurs when the published media stream falls back to an audio-only stream. | v4.6.0 | |
rtcEngine(_:downlinkNetworkInfoUpdate:) | Occurs when the downlink network information changes. | v4.6.0 | |
wlAccStats | Wi-Fi acceleration stats | v4.6.0 | |
AgoraWlAccReason | v4.6.0 | ||
AgoraWlAccAction | v4.6.0 | ||
rtcEngine(_:wlAccStats:averageStats:) | v4.6.0 | ||
rtcEngine(_:wlAccMessage:action:wlAccMsg:) | v4.6.0 | ||
enableWirelessAccelerate | Enables or disable Wi-Fi acceleration. | v4.6.0 | |
receivedFrameRate (removed from AgoraRtcRemoteVideoStats) | v4.6.0 | ||
setVideoProfile(_:swapWidthAndHeight:) | Set the video encoding configuration. | setVideoEncoderConfiguration(_:) | v4.4.0 |
setRemoteRenderMode(_:mode:) | Set the remote view display mode. | setRemoteRenderMode(_:mode:mirror:) | v4.4.0 |
openWithCustomSource(atStartPos:withPlayerOnReadData:andPlayerOnSeek:) | Open the custom media resource file. | open(with:) | v4.4.0 |
setVideoQualityParameters(_:preferFrameRateOverImageQuality:) | Set video optimization options (only available for live streaming). | Use the degradationPreference parameter in the AgoraVideoEncoderConfiguration class | v4.4.0 |
startEchoTest(_:) | Start the voice call loop test. | startEchoTest(withConfig:) | v4.4.0 |
startEchoTestWithInterval(_:successBlock:) | Start the voice call loop test. | startEchoTest(withConfig:) | v4.4.0 |
setEncryptionMode(_:) | Enable the built-in encryption scheme. | enableEncryption(_:encryptionConfig:) | v4.4.0 |
setEncryptionSecret(_:) | Enable built-in encryption, and set a data encryption password. | enableEncryption(_:encryptionConfig:) | v4.4.0 |
onEvent(provider:extension:key:value:) | Plugin event callback. | onEventWithContext(_:key:value:) | v4.4.0 |
onExtensionStarted(provider:extension:) | Plugin enable callback. | onExtensionStartedWithContext(_:) | v4.4.0 |
onExtensionStopped(provider:extension:) | Plugin disable callback. | onExtensionStoppedWithContext(_:) | v4.4.0 |
onExtensionError(provider:extension:error:message:) | Plugin error callback. | onExtensionErrorWithContext(_:error:message:) | v4.4.0 |
This page lists the deprecated and removed APIs in the SDK and their suggested alternatives.
Deprecated APIs
A deprecated API is expected to be officially removed in about one year from deprecation. Agora recommends using the alternate API as soon as possible to avoid impacting your online business.
Removed APIs
The following APIs have been removed from the SDK. Please use the recommended alternative to implement related functions.
| Removed API | Description | Alternate API | Deleting version |
|---|---|---|---|
setVideoProfile(_:swapWidthAndHeight:) | Set the video encoding configuration. | setVideoEncoderConfiguration(_:) | v4.4.0 |
setRemoteRenderMode(_:mode:) | Set the remote view display mode. | setRemoteRenderMode(_:mode:mirror:) | v4.4.0 |
openWithCustomSource(atStartPos:withPlayerOnReadData:andPlayerOnSeek:) | Open the custom media resource file. | open(with:) | v4.4.0 |
setVideoQualityParameters(_:preferFrameRateOverImageQuality:) | Set video optimization options (only available for live streaming). | Use the degradationPreference parameter in the AgoraVideoEncoderConfiguration class | v4.4.0 |
startEchoTest(_:) | Start the voice call loop test. | startEchoTest(withConfig:) | v4.4.0 |
startEchoTestWithInterval(_:successBlock:) | Start the voice call loop test. | startEchoTest(withConfig:) | v4.4.0 |
setEncryptionMode(_:) | Enable the built-in encryption scheme. | enableEncryption(_:encryptionConfig:) | v4.4.0 |
setEncryptionSecret(_:) | Enable built-in encryption, and set a data encryption password. | enableEncryption(_:encryptionConfig:) | v4.4.0 |
onEvent(provider:extension:key:value:) | Plugin event callback. | onEventWithContext(_:key:value:) | v4.4.0 |
onExtensionStarted(provider:extension:) | Plugin enable callback. | onExtensionStartedWithContext(_:) | v4.4.0 |
onExtensionStopped(provider:extension:) | Plugin disable callback. | onExtensionStoppedWithContext(_:) | v4.4.0 |
onExtensionError(provider:extension:error:message:) | Plugin error callback. | onExtensionErrorWithContext(_:error:message:) | v4.4.0 |
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
This page is not yet available for Voice Calling on this platform. Refer to the API reference for information about deprecated APIs.
