CompositeSequenceableLoader


@UnstableApi
class CompositeSequenceableLoader : SequenceableLoader


A SequenceableLoader that encapsulates multiple other SequenceableLoaders.

Summary

Public constructors

This function is deprecated.

Use CompositeSequenceableLoader instead.

CompositeSequenceableLoader(
    loaders: (Mutable)List<SequenceableLoader!>!,
    loaderTrackTypes: (Mutable)List<(Mutable)List<@C.TrackType Int!>!>!
)

Public functions

Boolean

Attempts to continue loading.

Long

Returns an estimate of the position up to which data is buffered.

Long

Returns the next load time, or TIME_END_OF_SOURCE if loading has finished.

Boolean

Returns whether the loader is currently loading.

Unit
reevaluateBuffer(positionUs: Long)

Re-evaluates the buffer given the playback position.

Public constructors

CompositeSequenceableLoader

CompositeSequenceableLoader(loaders: Array<SequenceableLoader!>!)

CompositeSequenceableLoader

CompositeSequenceableLoader(
    loaders: (Mutable)List<SequenceableLoader!>!,
    loaderTrackTypes: (Mutable)List<(Mutable)List<@C.TrackType Int!>!>!
)

Public functions

continueLoading

fun continueLoading(loadingInfo: LoadingInfo!): Boolean

Attempts to continue loading.

Parameters
loadingInfo: LoadingInfo!

The LoadingInfo when attempting to continue loading.

Returns
Boolean

True if progress was made, meaning that getNextLoadPositionUs will return a different value than prior to the call. False otherwise.

getBufferedPositionUs

fun getBufferedPositionUs(): Long

Returns an estimate of the position up to which data is buffered.

Returns
Long

An estimate of the absolute position in microseconds up to which data is buffered, or TIME_END_OF_SOURCE if the data is fully buffered.

getNextLoadPositionUs

fun getNextLoadPositionUs(): Long

Returns the next load time, or TIME_END_OF_SOURCE if loading has finished.

isLoading

fun isLoading(): Boolean

Returns whether the loader is currently loading.

reevaluateBuffer

fun reevaluateBuffer(positionUs: Long): Unit

Re-evaluates the buffer given the playback position.

Re-evaluation may discard buffered media or cancel ongoing loads so that media can be re-buffered in a different quality.

Parameters
positionUs: Long

The current playback position in microseconds. If playback of this period has not yet started, the value will be the starting position in this period minus the duration of any media in previous periods still to be played.