This page provides the release notes for the Agora Web SDK 4.x.
Chrome deprecates and removes the Plan B dialect
Chrome 93 and later versions deprecate and remove the Plan B dialect in WebRTC. For details, see the Chrome feature description. This change affects the following Agora Web SDK versions:
|Web SDK version||Impact|
|After a stream is published, the method call of
The beta version of Chrome 93 is scheduled to be released in August 2021. See the Chrome release timeline. If you use any of the above SDK versions, Agora recommends that you upgrade the SDK to the latest version.
v4.7.1 was released on September 13, 2021. This release fixed some issues on Safari 11 and iPad Chrome.
v4.7.0 was released on September 1, 2021.
As of v4.7.0, if you enable media stream encryption, the SDK automatically disables encryption and resets the encryption configurations after a user leaves the channel. To re-enable the encryption, call
setEncryptionConfig before the user joins the channel again.
This release makes the following improvements:
This release fixed the following issues:
LocalAudioTrack.setVolumeto adjust the local volume, the local user could not perceive the volume change.
LocalAudioTrack.setDevicecould get stuck in a pending state.
v4.6.3 was released on August 10, 2021. This release fixed an occasional issue: After the user closes a tab or browser on the local client, the remote client does not receive the
user-left event immediately.
v4.6.2 was released on July 30, 2021. This release fixed the issue that the SDK did not destroy all the media players created during a call or live streaming. Chrome 92 introduced a limit on the number of media players that can be created in a particular tab: 75 for the desktop. After you play tracks several times, the undestroyed media players in the SDK might cause the playback failure in the tab.
v4.6.1 was released on July 21, 2021. This release fixed an internal error.
v4.6.0 was released on July 16, 2021.
Interactive Live Streaming Standard
As of v4.6.0, the Web SDK supports Interactive Live Streaming Standard. The major difference between Agora Interactive Live Streaming Standard and Agora Live Interactive Streaming Premium is the latency level on the audience's client:
You can set the latency level of the audience role in the following two ways:
createClientto create a client object, set the
setClientRolemethod, set the
"audience"and the level parameter in
The mute states of local tracks
v4.6.0 adds the
localTrack.setMuted method to stop sending the media data of local tracks. The differences between this method and
localTrack.setEnabled are as follows:
localVideoTrack.setEnabled(false)to stop sending video, the SDK also immediately turns off the camera light and stops video capture, while
localVideoTrack.setMuteddoes not stop video capture.
setEnabled(true)takes longer to resume sending the media data than by than calling
For more information, see What are the differences between setEnabled and setMuted?
Dealing with autoplay blocking
To deal with the autoplay blocking of video on iOS, v4.6.0 deprecates the
onAudioAutoplayFailed callback, and adds the
onAutoplayFailed callback instead to indicate an audio or video autoplay failure.
On most web browsers, inaudible media are not affected by autoplay blocking. However, on iOS Safari with low power mode enabled, or on other iOS in-app browsers that implement a custom autoplay policy, such as the WeChat browser, the autoplay of inaudible media is blocked.
v4.6.0 fixes the following issues:
localAudioTrack.setVolumedid not take effect immediately.
v4.5.0 was released on May 25, 2021.
AEC (Acoustic Echo Canceller) for the audio played on the local client
In a scenario where multiple users play a media file at the same time, such as watching a movie together, if the user A plays the media file through HTMLMediaElement on Chrome with a speaker, the SDK captures the audio played by a speaker together with the voice of the user A. The other users can hear the audio sent by the user A and the audio played locally, which sounds like an echo. To deal with this echo issue, v4.5.0 adds the
processExternalMediaAEC method. You can call
processExternalMediaAEC and pass in the
HTMLMediaElement to enable the AEC for the audio played on the local client.
To strengthen the security of the key, v4.5.0 adds two encryption modes,
"aes-256-gcm2", which use the PBKDF2 (Password-Based Key Derivation Function 2). When calling
setEncryptionConfig and setting the encryption mode as
"aes-256-gcm2", you need to set
salt. For how to generate and set
salt, see Media Stream Encryption.
As of v4.5.0, when calling setArea to specify the region for connection, you can use the
areaCode parameter to specify a large region and use the
excludedArea parameter to specify a small region. The region for connection is the large region excluding the small region. You can only specify the large region as
"GLOBAL". For details, see Network Geofencing.
The preset video encoder configurations for screen sharing
v4.5.0 adds the following preset video encoder configurations for screen sharing in ScreenEncoderConfigurationPreset:
"480p_3": The resolution is 640 × 480 and the frame rate is 15 fps.
"720p_3": The resolution is 1280 × 720 and the frame rate is 15 fps.
"1080p_3": The resolution is 1920 × 1080 and the frame rate is 15 fps.
v4.5.0 fixes the following issues:
OptimizationModesetting did not take effect.
getRemoteVideoStatsmethod was still the resolution of the high-quality stream.
remoteAudioTrack.setVolumeto adjust the volume, if the playback was paused and then resumed, the volume changed back to the original one.
LocalAudioTrack.setVolumemethod did not take effect.
v4.4.0 was released on April 2, 2021.
Firewall domain whitelist
As of v4.4.0, the destination domains required for your firewall whitelist changes to:
.agora.io .edge.agora.io .sd-rtn.com .edge.sd-rtn.com
If you upgrade the SDK to v4.4.0, update your firewall domain whitelist to ensure you can use Agora products in environments with restricted network access.
AES-GCM encryption mode
In scenarios requiring high security, to ensure the confidentiality, integrity and authenticity of data, and to improve the computational efficiency of data encryption, v4.4.0 adds the following encryption modes in
"aes-128-xts": 128-bit AES encryption, GCM mode.
"aes-256-gcm": 256-bit AES encryption, GCM mode.
Once you enable the built-in encryption, all users in the same channel must use the same encryption mode and key, including the server-side users, such as the Agora recording service.
v4.4.0 adds the
client.on("is-using-cloud-proxy") event. The SDK triggers this event after the local client successfully publishes a media stream to indicate whether the media stream is forwarded by the cloud proxy service.
If you start media capturing after disabling the media capture device on Windows, the error thrown by the SDK changes from
v4.4.0 fixes the following issues:
"first-frame-decoded"event for a remote audio track.
v4.3.0 was released on January 26, 2021.
This release optimizes the Agora cloud proxy architecture and enhances the connectivity of the Web SDK in environments with restricted network access. The optimized Agora cloud proxy service also supports regional connection.
v4.2.1 was released on December 23, 2020. This release fixed the incorrect error that the SDK throws when you pass an illegal parameter in the client.publish method.
v4.2.0 was released on December 1, 2020.
This release adds the
AgoraRTC.setArea method for specifying the region for connection. After specifying the region, the SDK connects to the Agora servers within that region. The following regions are supported:
This advanced feature applies to scenarios that have regional restrictions.
Video transmission optimization strategy
This release adds the
localVideoTrack.setOptimizationMode method for setting the video transmission optimization mode:
"balanced": Uses the default transmission optimization strategy.
"detail": Prioritizes clarity.
"motion": Prioritizes smoothness.
See the API reference for the introduction to each transmission optimization mode. This method applies to scenarios where you need to dynamically adjust the optimization mode during a video call, live streaming, or screen sharing. For example, during the screen sharing, before you change the shared content from slides to a video, you can change the optimization mode from
"motion" to ensure smoothness in poor network conditions.
Network quality of remote users
This release adds the
AgoraRTCClient.getRemoteNetworkQuality method for getting the uplink and downlink network quality of all the remote users to whom the local user subscribes.
This release changes the
mode parameter of the
AgoraRTCClient.startProxyServer method from
setEnabled, you can still call
setDeviceto switch devices.
AgoraRTCClient.setEncryptionConfigto enable the built-in encryption, when the user uses a weak secret, the SDK outputs a warning message to the Web Console and prompts the user to use a strong secret. A strong secret must contain at least eight characters and be a combination of uppercase and lowercase letters, numbers, and special characters.
setEnabled(false)to disable a video track during the process of publishing, the publishing failed and could not be recovered.
BufferSourceAudioTrackcould be distorted.
onPlaybackDeviceChanged). The SDK only triggered these events for a subsequent device change.
v4.1.1 was released on October 27, 2020. This release fixed the following issues:
createCameraVideoTrackdid not stop on Safari when the SDK cannot find a video capture device.
unsubscribeto unsubscribing from an unpublished track of a remote user, the subsequent subscribing and unsubscribing operations failed to take effect.
setEnabledto enable and disable a video track in dual-stream mode.
client.getLocalVideoStatswas called on Safari.
v4.1.0 was released on September 4, 2020.
v4.1.0 adds the
getCurrentFrameData method which gets the data of the video frame being rendered.
Audio playback device management
v4.1.0 adds the following APIs to manage audio playback devices:
setPlaybackDevice: Sets the audio playback device, for example, the speaker. This method supports Chrome only.
getPlaybackDevices: Retrieves the audio playback devices available.
onPlaybackDeviceChanged: Occurs when an audio playback device is added or removed.
checkVideoTrackIsActiveon Safari is inaccurate.
setEnabledafter leaving the channel.
RemoteTrack.getStatsmethods. Use the
v4.0.1 was released on July 18, 2020. This release fixed the following issues:
v4.0.0 was released on July 15, 2020.
v4.0.0 deletes the
LocalTrack.setMute method and adds the
LocalTrack.setEnabled method for enabling or disabling a local track. The advantages of this change are as follows:
Client.on("user-mute-updated")callback when the remote user calls
setMuteto change the mute state.
Client.on("user-published")callbacks when the remote user calls
setEnabledto enable or disable a track.
setMute(true), the SDK sends black video frames or silenced audio frames. If you mute a local video track, the camera light stays on, which might adversely impact the user experience. In contrast, if you disable a local video track by calling
setEnabled(false), the SDK immediately turns off the camera and stops capturing video.
setEnabledmethod changes media input behaviors, so it is an asynchronous operation and returns the result through the
Video encoding strategy
v4.0.0 adds the
optimizationMode property in the
CustomVideoTrackInitConfig interfaces. When creating a video track by calling
createScreenVideoTrack, you can choose whether to prioritize video quality or smoothness by setting optimizationMode as the following:
"detail": Prioritizes video quality.
"motion": Prioritizes video smoothness.
optimizationModeproperty of the video track created by calling createScreenVideoTrack is set as
AgoraRTC.createScreenVideoTrack. In addition to
disable, you can also set
auto. In this setting, the SDK shares the audio, dependent on whether the browser supports this function.
"all"any more to avoid code repetition. As of v4.0.0, you can only set
"video". This change involves the following APIs:
v4.0.0 fixed the following issues:
unpublish, the SDK triggerred the
Client.on("user-left")callback on the remote side.
Client.on("network-quality")callback was inaccurate.
CameraVideoTrackInitConfig, ``ScreenVideoTrackInitConfig, and
autoto the withAudio parameter in
"all"from the mediaType parameter in
mediaTypeparameter in the
Client.on("user-unpublished")callbacks does report