All Products
Search
Document Center

ApsaraVideo Live:RTS playback

Last Updated:Aug 12, 2025

Real-Time Streaming (RTS) is a value-added feature of ApsaraVideo Live. The ApsaraVideo Player SDK uses RTS to deliver live streaming with millisecond-level latency for millions of concurrent users. This resolves the 3- to 6-second latency issue found in traditional live streaming. It provides an ultra-low latency, low-stuttering, and instant playback experience. This topic describes how to implement RTS playback.

Important

For more information about features, API documentation, and the FAQ, see Android player.

RTS playback

The ApsaraVideo Player SDK for Android integrates the native RTS SDK to enable low-latency live streaming on native clients. For more information, see Implement RTS stream pulling on Android.

For a detailed code example, see the RTS ultra-low latency live playback (RtsLiveStream) module in API-Example. This Java-based sample project for the ApsaraVideo Player SDK for Android helps developers quickly learn how to integrate the core features of the SDK.

RTS downgrade

Automatic RTS downgrade

When you play a stream using an RTS URL for ultra-low latency live streaming, if RTS stream pulling fails and no downgrade URL is set, the player automatically downgrades to the default FLV URL that corresponds to the RTS URL. The following code provides an example:

// 1: enabled, 0: disabled. Default: enabled.
AliPlayerGlobalSettings.setOption(AliPlayerGlobalSettings.ALLOW_RTS_DEGRADE, 1);

Custom RTS downgrade

When you play a stream using an RTS URL for ultra-low latency live streaming, you can set a downgrade URL, such as an HLS or FLV URL. If RTS stream pulling fails, the player automatically downgrades to the specified URL for playback. The following code provides an example:

PlayerConfig config = aliPlayer.getConfig();
// Optional. Configure other items for the config object.
UrlSource urlSource = new UrlSource();
urlSource.setUri(downgradeUrl);
// Set the downgrade URL.
aliPlayer.enableDowngrade(urlSource, config);