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 APIDescriptionAlternate APIDeprecating version
startRhythmPlayerEnables the virtual metronome.-v4.6.0
configRhythmPlayerConfigures the virtual metronome.-v4.6.0
onRhythmPlayerStateChangedOccurs 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
destroyDestroys the music player.destroyMusicPlayerv4.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
enableDualStreamModeExEnables or disables dual-stream mode on the sender side.setDualStreamModeExv4.2.0
enableWebSdkInteroperabilityEnables interoperability with the Agora Web SDK, applicable only in live streaming scenarios.-v4.0.0
setExternalAudioSource [1/2]Sets the external audio source.createCustomAudioTrackv4.0.0
setExternalAudioSource [2/2]Sets the parameters of the external audio source.createCustomAudioTrackv4.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
setLocalVideoMirrorModeSets 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
setLogFileSizeSets the size of the SDK log file.Use the config parameter in create [2/2].v4.0.0
setLogFilterSets the SDK log filter level.Use the config parameter in create [2/2].v4.0.0
setLogFileSets the SDK log output file.Use the config parameter in create [2/2].v4.0.0
setLogLevelSets 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 setAudioScenariov4.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
getBlueGets the blue component of the background color.-v4.0.0
getGreenGets the green component of the background color.-v4.0.0
getRedGets the red component of the background color.-v4.0.0
setBlueSets the blue component of the background color.-v4.0.0
setGreenSets the green component of the background color.-v4.0.0
setRedSets the red component of the background color.-v4.0.0
onAudioMixingFinishedOccurs when local music playback finishes.onAudioMixingStateChangedv4.0.0
onAudioQualityReports the statistics of the audio streams sent by each remote user.onRemoteAudioStatsv4.0.0
onConnectionBannedOccurs when the connection is banned by the Agora server.onConnectionStateChangedv4.0.0
onConnectionInterruptedOccurs when the connection is interrupted.onConnectionStateChangedv4.0.0
onFirstRemoteAudioFrameOccurs when the first remote audio frame is received.onRemoteAudioStateChangedv4.0.0
onFirstRemoteAudioDecodedOccurs when the first remote audio frame is decoded.onRemoteAudioStateChangedv4.0.0
onRemoteAudioTransportStatsReports the transport-layer statistics of each remote audio stream.onRemoteAudioStatsv4.0.0
onRemoteVideoTransportStatsReports the transport-layer statistics of each remote video stream.onRemoteVideoStatsv4.0.0
onUserEnableLocalVideoOccurs when a specified remote user enables or disables local video capture.onRemoteVideoStateChangedv4.0.0
onVideoStoppedOccurs when video playback stops.onLocalVideoStateChangedv4.0.0

Removed APIs

The following APIs have been removed from the SDK. Please use the recommended alternative to implement related functions.

Removed APIDescriptionAlternate APIDeleting version
setLocalPublishFallbackOptionSets the fallback option for the published audio and video stream based on the network conditions.-v4.6.0
onLocalPublishFallbackToAudioOnlyOccurs when the local published stream falls back to audio-only.-v4.6.0
onDownlinkNetworkInfoUpdatedOccurs when the downlink network information changes.-v4.6.0
enableWirelessAccelerateEnables or disables Wi-Fi acceleration.-v4.6.0
onWlAccStatsReports Wi-Fi acceleration statistics.-v4.6.0
onWlAccMessageReports Wi-Fi acceleration messages.-v4.6.0
WlAccStatsWi-Fi acceleration statistics.-v4.6.0
setVideoProfileSets the video encoder configuration.setVideoEncoderConfigurationv4.4.0
setRemoteRenderMode(userId, renderMode)Sets the display mode of the remote view.setRemoteRenderModev4.4.0
CreateRendererViewCreates a RendererView.Use Android's native SurfaceView.v4.4.0
CreateTextureViewCreates a TextureView.Use Android's native TextureView.v4.4.0
openWithCustomSourceOpens a custom media resource file.openWithMediaSourcev4.4.0
startEchoTest()Starts the voice call loop test.startEchoTestv4.4.0
startEchoTest(intervalInSeconds)Starts the voice call loop test.startEchoTestv4.4.0
setEncryptionModeEnables the built-in encryption scheme.enableEncryptionv4.4.0
setEncryptionSecretEnables built-in encryption and sets the data encryption password.enableEncryptionv4.4.0
onEventPlugin event callback.onEventWithContextv4.4.0
onStartedOccurs when the plugin is enabled.onStartedWithContextv4.4.0
onStoppedOccurs when the plugin is disabled.onStoppedWithContextv4.4.0
onErrorPlugin error callback.onErrorWithContextv4.4.0