DefaultPreloadManager.PreloadStatus


public final class DefaultPreloadManager.PreloadStatus


Defines the preload status for the DefaultPreloadManager.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = TYPE_USE)
@IntDef(value = )
public annotation DefaultPreloadManager.PreloadStatus.Stage

Stages for the preload status.

Constants

static final DefaultPreloadManager.PreloadStatus

A PreloadStatus indicating that the source has completed preparation.

static final int

The PreloadMediaSource has completed preparation.

static final int

The PreloadMediaSource has been loaded for a specific range defined by startPositionMs and durationMs.

static final int

The PreloadMediaSource has tracks selected.

static final DefaultPreloadManager.PreloadStatus

A PreloadStatus indicating that the source has tracks selected.

Public fields

final long

The duration in milliseconds for which the source should be loaded from the startPositionMs, or TIME_UNSET to indicate that the source should be loaded to end of source.

final int

The stage for the preload status.

final long

The start position in milliseconds from which the source should be loaded, or TIME_UNSET to indicate the default start position.

Public methods

static DefaultPreloadManager.PreloadStatus
specifiedRangeLoaded(long durationMs)

Returns a PreloadStatus indicating to load the source from the default start position and for the specified duration.

static DefaultPreloadManager.PreloadStatus
specifiedRangeLoaded(long startPositionMs, long durationMs)

Returns a PreloadStatus indicating to load the source from the specified start position and for the specified duration.

Constants

SOURCE_PREPARED

public static final DefaultPreloadManager.PreloadStatus SOURCE_PREPARED

A PreloadStatus indicating that the source has completed preparation.

STAGE_SOURCE_PREPARED

public static final int STAGE_SOURCE_PREPARED = 0

The PreloadMediaSource has completed preparation.

STAGE_SPECIFIED_RANGE_LOADED

public static final int STAGE_SPECIFIED_RANGE_LOADED = 2

The PreloadMediaSource has been loaded for a specific range defined by startPositionMs and durationMs.

STAGE_TRACKS_SELECTED

public static final int STAGE_TRACKS_SELECTED = 1

The PreloadMediaSource has tracks selected.

TRACKS_SELECTED

public static final DefaultPreloadManager.PreloadStatus TRACKS_SELECTED

A PreloadStatus indicating that the source has tracks selected.

Public fields

durationMs

public final long durationMs

The duration in milliseconds for which the source should be loaded from the startPositionMs, or TIME_UNSET to indicate that the source should be loaded to end of source.

stage

@DefaultPreloadManager.PreloadStatus.Stage
public final int stage

The stage for the preload status.

startPositionMs

public final long startPositionMs

The start position in milliseconds from which the source should be loaded, or TIME_UNSET to indicate the default start position.

Public methods

specifiedRangeLoaded

public static DefaultPreloadManager.PreloadStatus specifiedRangeLoaded(long durationMs)

Returns a PreloadStatus indicating to load the source from the default start position and for the specified duration.

specifiedRangeLoaded

public static DefaultPreloadManager.PreloadStatus specifiedRangeLoaded(long startPositionMs, long durationMs)

Returns a PreloadStatus indicating to load the source from the specified start position and for the specified duration.