public class

HlsMediaPlaylist.SegmentBase

extends java.lang.Object

implements java.lang.Comparable<java.lang.Long>

 java.lang.Object

↳androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.SegmentBase

Subclasses:

HlsMediaPlaylist.Segment, HlsMediaPlaylist.Part

Overview

The base for a HlsMediaPlaylist.Segment or a HlsMediaPlaylist.Part required for playback.

Summary

Fields
public final longbyteRangeLength

The segment's byte range length, as defined by #EXT-X-BYTERANGE, #EXT-X-PART or #EXT-X-PRELOAD-HINT, or C.LENGTH_UNSET if no byte range is specified or the byte range is open-ended.

public final longbyteRangeOffset

The segment's byte range offset, as defined by #EXT-X-BYTERANGE, #EXT-X-PART or #EXT-X-PRELOAD-HINT.

public final DrmInitDatadrmInitData

DRM initialization data for sample decryption, or null if the segment does not use CDM-DRM protection.

public final longdurationUs

The duration of the segment in microseconds, as defined by #EXTINF or #EXT-X-PART.

public final java.lang.StringencryptionIV

The encryption initialization vector as defined by #EXT-X-KEY, or null if the segment is not encrypted.

public final java.lang.StringfullSegmentEncryptionKeyUri

The encryption identity key uri as defined by #EXT-X-KEY, or null if the segment does not use full segment encryption with identity key.

public final booleanhasGapTag

Whether the segment is marked as a gap.

public final HlsMediaPlaylist.SegmentinitializationSegment

The media initialization section for this segment, as defined by #EXT-X-MAP.

public final intrelativeDiscontinuitySequence

The number of #EXT-X-DISCONTINUITY tags in the playlist before the segment.

public final longrelativeStartTimeUs

The start time of the segment in microseconds, relative to the start of the playlist.

public final java.lang.Stringurl

The url of the segment.

Methods
public intcompareTo(java.lang.Long relativeStartTimeUs)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final java.lang.String url

The url of the segment.

public final HlsMediaPlaylist.Segment initializationSegment

The media initialization section for this segment, as defined by #EXT-X-MAP. May be null if the media playlist does not define a media initialization section for this segment. The same instance is used for all segments that share an EXT-X-MAP tag.

public final long durationUs

The duration of the segment in microseconds, as defined by #EXTINF or #EXT-X-PART.

public final int relativeDiscontinuitySequence

The number of #EXT-X-DISCONTINUITY tags in the playlist before the segment.

public final long relativeStartTimeUs

The start time of the segment in microseconds, relative to the start of the playlist.

public final DrmInitData drmInitData

DRM initialization data for sample decryption, or null if the segment does not use CDM-DRM protection.

public final java.lang.String fullSegmentEncryptionKeyUri

The encryption identity key uri as defined by #EXT-X-KEY, or null if the segment does not use full segment encryption with identity key.

public final java.lang.String encryptionIV

The encryption initialization vector as defined by #EXT-X-KEY, or null if the segment is not encrypted.

public final long byteRangeOffset

The segment's byte range offset, as defined by #EXT-X-BYTERANGE, #EXT-X-PART or #EXT-X-PRELOAD-HINT.

public final long byteRangeLength

The segment's byte range length, as defined by #EXT-X-BYTERANGE, #EXT-X-PART or #EXT-X-PRELOAD-HINT, or C.LENGTH_UNSET if no byte range is specified or the byte range is open-ended.

public final boolean hasGapTag

Whether the segment is marked as a gap.

Methods

public int compareTo(java.lang.Long relativeStartTimeUs)