4.2.2
v4.2.2 was released on July 27, 2023.
New features
-
Wildcard token
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.
All 4.x SDKs support using wildcard tokens.
-
Preloading channels
This release adds
preloadchannel(bytoken:channelid:uid:)
andpreloadchannel(bytoken:channelid:useraccount:))
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.
-
Customized background color of video canvas
In this release, the
backgroundColor
member has been added toAgoraRtcVideoCanvas
, 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(_:)
andstopPreview(_:)
. You can callstartPreview(_:)
and specify the type of video source to be previewed by setting thesourceType
parameter, and callstopPreview(_:)
to stop the video preview.
The video source type specified in this method must match the video source type set in the
AgoraRtcVideoCanvas
of thesetupLocalVideo(_:)
method.
Improvements
-
Improved camera capture effect
This release has improved camera capture effect in the following aspects:
-
Support for camera exposure adjustment
This release adds
isCameraExposureSupported()
to query whether the device supports exposure adjustment andsetCameraExposureFactor(_:)
to set the exposure ratio of the camera. -
Optimization of default camera selection
Since this release, the default camera selection behavior of the SDK is aligned with that of the iOS system camera. If the device has multiple rear cameras, better shooting perspectives, zooming capabilities, low-light performance, and depth sensing can be achieved during video capture, thereby improving the quality of video capture.
-
-
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
startOrUpdateChannelMediaRelay(_:)
andstartOrUpdateChannelMediaRelayEx(_:connection:)
, 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
codecCapLevels
member inAgoraVideoCodecCapInfo
. After successfully callingqueryCodecCapability()
, you can obtain the hardware and software decoding capability levels of the device for H.264 and H.265 video formats throughAgoraVideoCodecCapLevels
.
This release includes the following additional improvements:
- The SDK automacially 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
AgoraVideoRemoteReason.codecNotSupport
enumeration has been added to theremoteVideoStateChangedOfUid
callback, indicating that the local video decoder does not support decoding the received remote video stream.
Issues fixed
This release fixed the following issues:
- 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,
setBeautyEffectOptions
,setLowlightEnhanceOptions
,setVideoDenoiserOptions
, andsetColorEnhanceOptions
could not load extensions automatically.