Class MediaLoadData


  • public final class MediaLoadData
    extends Object
    Descriptor for data being loaded or selected by a MediaSource.
    • Field Detail

      • dataType

        public final @com.google.android.exoplayer2.C.DataType int dataType
      • trackType

        public final @com.google.android.exoplayer2.C.TrackType int trackType
        One of the track types, which is a media track type if the data corresponds to media of a specific type, or C.TRACK_TYPE_UNKNOWN otherwise.
      • trackFormat

        @Nullable
        public final Format trackFormat
        The format of the track to which the data belongs. Null if the data does not belong to a specific track.
      • trackSelectionData

        @Nullable
        public final Object trackSelectionData
        Optional data associated with the selection of the track to which the data belongs. Null if the data does not belong to a track.
      • mediaStartTimeMs

        public final long mediaStartTimeMs
        The start time of the media in the MediaPeriod, or C.TIME_UNSET if the data does not belong to a specific MediaPeriod.
      • mediaEndTimeMs

        public final long mediaEndTimeMs
        The end time of the media in the MediaPeriod, or C.TIME_UNSET if the data does not belong to a specific MediaPeriod or the end time is unknown.
    • Constructor Detail

      • MediaLoadData

        public MediaLoadData​(@com.google.android.exoplayer2.C.DataType int dataType)
        Creates an instance with the given dataType.
      • MediaLoadData

        public MediaLoadData​(@com.google.android.exoplayer2.C.DataType int dataType,
                             @com.google.android.exoplayer2.C.TrackType int trackType,
                             @Nullable
                             Format trackFormat,
                             @com.google.android.exoplayer2.C.SelectionReason int trackSelectionReason,
                             @Nullable
                             Object trackSelectionData,
                             long mediaStartTimeMs,
                             long mediaEndTimeMs)
        Creates media load data.
        Parameters:
        dataType - See dataType.
        trackType - See trackType.
        trackFormat - See trackFormat.
        trackSelectionReason - See trackSelectionReason.
        trackSelectionData - See trackSelectionData.
        mediaStartTimeMs - See mediaStartTimeMs.
        mediaEndTimeMs - See mediaEndTimeMs.