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.
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
LAYER1toLAYER6, 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 LAYER12160p (4K) LAYER21440p (2K) LAYER31080p (HD) LAYER4720p (HD) LAYER5540p (SD) LAYER6480p (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.