@UnstableApi
class MediaLoadData


Descriptor for data being loaded or selected by a MediaSource.

Summary

Public constructors

Creates an instance with the given dataType.

MediaLoadData(
    @C.DataType dataType: Int,
    @C.TrackType trackType: Int,
    trackFormat: Format?,
    @C.SelectionReason trackSelectionReason: Int,
    trackSelectionData: Any?,
    mediaStartTimeMs: Long,
    mediaEndTimeMs: Long
)

Creates media load data.

Public properties

Int

The data type.

Long

The end time of the media in the MediaPeriod, or TIME_UNSET if the data does not belong to a specific MediaPeriod or the end time is unknown.

Long

The start time of the media in the MediaPeriod, or TIME_UNSET if the data does not belong to a specific MediaPeriod.

Format?

The format of the track to which the data belongs.

Any?

Optional data associated with the selection of the track to which the data belongs.

Int

One of the selection reasons if the data belongs to a track.

Int

One of the track types, which is a media track type if the data corresponds to media of a specific type, or TRACK_TYPE_UNKNOWN otherwise.

Public constructors

MediaLoadData

MediaLoadData(@C.DataType dataType: Int)

Creates an instance with the given dataType.

MediaLoadData

MediaLoadData(
    @C.DataType dataType: Int,
    @C.TrackType trackType: Int,
    trackFormat: Format?,
    @C.SelectionReason trackSelectionReason: Int,
    trackSelectionData: Any?,
    mediaStartTimeMs: Long,
    mediaEndTimeMs: Long
)

Creates media load data.

Parameters
@C.DataType dataType: Int

See dataType.

@C.TrackType trackType: Int

See trackType.

trackFormat: Format?

See trackFormat.

@C.SelectionReason trackSelectionReason: Int

See trackSelectionReason.

trackSelectionData: Any?

See trackSelectionData.

mediaStartTimeMs: Long

See mediaStartTimeMs.

mediaEndTimeMs: Long

See mediaEndTimeMs.

Public properties

dataType

@C.DataType
val dataTypeInt

The data type.

mediaEndTimeMs

val mediaEndTimeMsLong

The end time of the media in the MediaPeriod, or TIME_UNSET if the data does not belong to a specific MediaPeriod or the end time is unknown.

mediaStartTimeMs

val mediaStartTimeMsLong

The start time of the media in the MediaPeriod, or TIME_UNSET if the data does not belong to a specific MediaPeriod.

trackFormat

val trackFormatFormat?

The format of the track to which the data belongs. Null if the data does not belong to a specific track.

trackSelectionData

val trackSelectionDataAny?

Optional data associated with the selection of the track to which the data belongs. Null if the data does not belong to a track.

trackSelectionReason

@C.SelectionReason
val trackSelectionReasonInt

One of the selection reasons if the data belongs to a track. SELECTION_REASON_UNKNOWN otherwise.

trackType

@C.TrackType
val trackTypeInt

One of the track types, which is a media track type if the data corresponds to media of a specific type, or TRACK_TYPE_UNKNOWN otherwise.