SetAbrFallbackLayer

Sets the fallback option for the subscribed video stream.

void SetAbrFallbackLayer(AbrFallbackLayer abr_fallback_layer, Error *err = nullptr)
Since
Available since v4.4.0.

When the network condition is poor, the SDK will downgrade the video stream resolution to the specified fallback quality layer to ensure continuous playback. Different quality layers correspond to different resolutions and bitrates. The SDK continuously monitors the network condition and automatically restores the video stream to the subscribed quality layer when the network recovers. By default, fallback is only supported to kRteAbrFallbackLow or kRteAbrFallbackAudioOnly. For a more flexible video experience, you can contact technical support to enable the ABR feature. Once enabled, fallback to all quality layers is supported, and you can customize the resolution of each layer.

Note: If the ABR feature is not enabled when calling this method, the fallback quality layer of the video stream can only be kRteAbrFallbackLow or kRteAbrFallbackAudioOnly.

Scenario

In general scenarios, you can call this method and set the fallback quality layer to kRteAbrFallbackLow or kRteAbrFallbackAudioOnly. When the network is poor, the SDK will fall back to a lower quality video stream or audio-only stream. If you require higher resolution for fallback video streams, you can contact technical support to enable the ABR feature. Once enabled, you can customize the resolution of each layer. The SDK will use the resolution of the lowest quality layer you specify as the lower bound and dynamically adjust the resolution within that range based on network conditions.

Timing

This method must be called before calling SetConfigs.

Parameters

abr_fallback_layer
The fallback quality layer of the video stream. See RteAbrFallbackLayer. When customizing the resolution from kRteAbrFallbackLayer1 to kRteAbrFallbackLayer6, refer to the table below:
Note: When customizing resolutions, be sure to sort the video quality layers by resolution from high to low; when resolutions are the same, sort by frame rate from high to low.
Video Quality Layer Resolution
kRteAbrSubscriptionLayer1 2160p (4K)
kRteAbrSubscriptionLayer2 1440p (2K)
kRteAbrSubscriptionLayer3 1080p (HD)
kRteAbrSubscriptionLayer4 720p (HD)
kRteAbrSubscriptionLayer5 540p (SD)
kRteAbrSubscriptionLayer6 480p (SD)
err
Status or error information. See Error.