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
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
AgoraDirectCdnStreamingMediaOptionsThe media setting options for the host.Use Media Push instead.v4.6.0
AgoraDirectCdnStreamingStatsThe statistics of the current CDN streaming.Use Media Push instead.v4.6.0
AgoraDirectCdnStreamingStateThe current CDN streaming state.Use Media Push instead.v4.6.0
AgoraDirectCdnStreamingReasonReasons 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 flowcreateDataStreamEx(_: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 APIDescriptionAlternate APIDeleting 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
wlAccStatsWi-Fi acceleration statsv4.6.0
AgoraWlAccReasonv4.6.0
AgoraWlAccActionv4.6.0
rtcEngine(_:wlAccStats:averageStats:)v4.6.0
rtcEngine(_:wlAccMessage:action:wlAccMsg:)v4.6.0
enableWirelessAccelerateEnables 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 classv4.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