setAbrSubscriptionLayer

Sets the video quality level of the subscribed media stream.

public void setAbrSubscriptionLayer(Constants.AbrSubscriptionLayer subscriptionLayer) throws RteException
Since
Available since v4.4.0.

You can switch between different video quality levels in the subscribed video stream based on actual network conditions. If you need more advanced control over video resolution switching, contact technical support to enable the ABR (Adaptive Bitrate) feature. Once enabled, you can customize the resolution for each video quality level, allowing viewers to switch among all levels of multi-quality video streams as needed.

Note: If the ABR feature is not enabled, you can only subscribe to HIGH or LOW video quality levels.

Scenario

In unstable network environments, the subscriber can select an appropriate video quality layer based on the actual network conditions to ensure a smooth viewing experience.

Timing

This method must be called before calling setConfigs.

Parameters

subscriptionLayer
The video quality level to subscribe to. See AbrSubscriptionLayer. When customizing resolutions for LAYER1 to LAYER6, you can refer to the table below or configure based on actual needs: Note: When customizing resolutions, you must sort the video quality levels (Layers) from high to low resolution. If the resolutions are the same, sort by frame rate from high to low.
Video Quality Level Resolution
LAYER1 2160p (4K)
LAYER2 1440p (2K)
LAYER3 1080p (HD)
LAYER4 720p (HD)
LAYER5 540p (SD)
LAYER6 480p (SD)

Exceptions

If the method call fails, the SDK throws an RteException containing the corresponding error message. You need to catch and handle the exception.