v4.2.2 was released on July xx, 2023.
This release introduces wildcard tokens. Agora supports setting the channel name used for generating a token as a wildcard character. The token generated can be used to join any channel if you use the same user id. In scenarios involving multiple channels, such as switching between different channels, using a wildcard token can avoid repeated application of tokens every time users joining a new channel, which reduces the pressure on your token server. See Secure authentication with tokens.
All 4.x SDKs support using wildcard tokens.
This release adds
preloadChannelByToken[2/2] methods, which allows a user whose role is set as audience to preload channels before joining one. Calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear and see the host.
When preloading more than one channels, Agora recommends that you use a wildcard token for preloading to avoid repeated application of tokens every time you joining a new channel, thus saving the time for switching between channels. See Secure authentication with tokens.
Customized background color of video canvas
In this release, the
backgroundColor member has been added to
AgoraRtcVideoCanvas, which allows you to customize the background color of the video canvas when setting the properties of local or remote video display.
Video source types for local preview
To allow users in selecting different types of video sources for local video preview, this release introduces
startPreview [2/2] and
stopPreview [2/2]. You can call
startPreview [2/2] and specify the type of video source to be previewed by setting the
sourceType parameter, and call
stopPreview [2/2] to stop the video preview.
The video source type specified in this method must match the video source type set in the
AgoraRtcVideoCanvas of the
Publishing video streams from different sources
This release adds the following members in
AgoraRtcChannelMediaOptions to allow you publish video streams captured from the third and fourth camera or screen:
publishThirdCameraTrack: Publishing the video stream captured from the third camera.
publishFourthCameraTrack: Publishing the video stream captured from the fourth camera.
publishThirdScreenTrack: Publishing the video stream captured from the third screen.
publishFourthScreenTrack: Publishing the video stream captured from the fourth screen.
AgoraRtcConnection, Agora supports publishing multiple audio streams and
one video stream at the same time.
Virtual Background Algorithm Upgrade
This version has upgraded the portrait segmentation algorithm of the virtual background, which comprehensively improves the accuracy of portrait segmentation, the smoothness of the portrait edge with the virtual background, and the fit of the edge when the person moves. In addition, it optimizes the precision of the person's edge in scenarios such as meetings, offices, homes, and under backlight or weak light conditions.
Channel media relay
The number of target channels for media relay has been increased to 6. When calling
startOrUpdateChannelMediaRelayEx, you can specify up to 6 target channels.
Enhancement in video codec query capability
To improve the video codec query capability, this release adds the
codecLevels member in
AgoraVideoCodecCapInfo. After successfully calling
queryCodecCapability, you can obtain the hardware and software decoding capability levels of the device for H.264 and H.265 video formats through
This release includes the following additional improvements:
- The SDK automatically adjusts the frame rate of the sending end based on the screen sharing scenario. Especially in document sharing scenarios, this feature avoids exceeding the expected video bitrate on the sending end to improve transmission efficiency and reduce network burden.
- To help users understand the reasons for more types of remote video state changes, the
AgoraVideoRemoteReasonCodecNotSupport enumeration has been added to the
remoteVideoStateChangedOfUid callback, indicating that the local video decoder does not support decoding the received remote video stream.
This release fixed the following issues:
- Occasionally, noise occurred when the local user listened to their own and remote audio after joining the channel.
- Slow channel reconnection after the connection was interrupted due to network reasons.
- In screen sharing scenarios, the delay of seeing the shared screen was occasionally higher than expected on some devices.
- In custom video capturing scenarios,
setColorEnhanceOptions could not load extensions automatically.