This page provides the release notes for the Agora Web SDK 4.x.
For the web browser support of the Web SDK 4.x, see Which browsers does the Agora Web SDK support?
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.0 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