docs/doc/reference/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.Segment.html
Package com.google.android.exoplayer2.source.hls.playlist
All Implemented Interfaces:Comparable<Long>Enclosing class:HlsMediaPlaylist
public static final classHlsMediaPlaylist.Segmentextends[HlsMediaPlaylist.SegmentBase](HlsMediaPlaylist.SegmentBase.html "class in com.google.android.exoplayer2.source.hls.playlist")
Media segment reference.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| List<HlsMediaPlaylist.Part> | parts |
The parts belonging to this segment.
|
| String | title |
The human readable title of the segment.
|
-
byteRangeLength, byteRangeOffset, drmInitData, durationUs, encryptionIV, fullSegmentEncryptionKeyUri, hasGapTag, initializationSegment, relativeDiscontinuitySequence, relativeStartTimeUs, url
Constructors | Constructor | Description |
| --- | --- |
| Segment(String uri, long byteRangeOffset, long byteRangeLength, String fullSegmentEncryptionKeyUri, String encryptionIV) |
Creates an instance to be used as init segment.
|
| Segment(String url, HlsMediaPlaylist.Segment initializationSegment, String title, long durationUs, int relativeDiscontinuitySequence, long relativeStartTimeUs, DrmInitData drmInitData, String fullSegmentEncryptionKeyUri, String encryptionIV, long byteRangeOffset, long byteRangeLength, boolean hasGapTag, List<HlsMediaPlaylist.Part> parts) |
Creates an instance.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| HlsMediaPlaylist.Segment | copyWith(long relativeStartTimeUs, int relativeDiscontinuitySequence) | |
-
compareTo
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")title
The human readable title of the segment.
-
public final[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[HlsMediaPlaylist.Part](HlsMediaPlaylist.Part.html "class in com.google.android.exoplayer2.source.hls.playlist")> parts
The parts belonging to this segment.
-
public Segment([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")uri,
long byteRangeOffset,
long byteRangeLength,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")fullSegmentEncryptionKeyUri,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")encryptionIV)
Creates an instance to be used as init segment.
Parameters:uri - See HlsMediaPlaylist.SegmentBase.url.byteRangeOffset - See HlsMediaPlaylist.SegmentBase.byteRangeOffset.byteRangeLength - See HlsMediaPlaylist.SegmentBase.byteRangeLength.fullSegmentEncryptionKeyUri - See HlsMediaPlaylist.SegmentBase.fullSegmentEncryptionKeyUri.encryptionIV - See HlsMediaPlaylist.SegmentBase.encryptionIV.
-
public Segment([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")url,
@Nullable[HlsMediaPlaylist.Segment](HlsMediaPlaylist.Segment.html "class in com.google.android.exoplayer2.source.hls.playlist")initializationSegment,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")title,
long durationUs,
int relativeDiscontinuitySequence,
long relativeStartTimeUs,
@Nullable[DrmInitData](../../../drm/DrmInitData.html "class in com.google.android.exoplayer2.drm")drmInitData,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")fullSegmentEncryptionKeyUri,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")encryptionIV,
long byteRangeOffset,
long byteRangeLength,
boolean hasGapTag,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[HlsMediaPlaylist.Part](HlsMediaPlaylist.Part.html "class in com.google.android.exoplayer2.source.hls.playlist")> parts)
Creates an instance.
Parameters:url - See HlsMediaPlaylist.SegmentBase.url.initializationSegment - See HlsMediaPlaylist.SegmentBase.initializationSegment.title - See title.durationUs - See HlsMediaPlaylist.durationUs.relativeDiscontinuitySequence - See HlsMediaPlaylist.SegmentBase.relativeDiscontinuitySequence.relativeStartTimeUs - See HlsMediaPlaylist.SegmentBase.relativeStartTimeUs.drmInitData - See HlsMediaPlaylist.SegmentBase.drmInitData.fullSegmentEncryptionKeyUri - See HlsMediaPlaylist.SegmentBase.fullSegmentEncryptionKeyUri.encryptionIV - See HlsMediaPlaylist.SegmentBase.encryptionIV.byteRangeOffset - See HlsMediaPlaylist.SegmentBase.byteRangeOffset.byteRangeLength - See HlsMediaPlaylist.SegmentBase.byteRangeLength.hasGapTag - See HlsMediaPlaylist.SegmentBase.hasGapTag.parts - See parts.
-
public[HlsMediaPlaylist.Segment](HlsMediaPlaylist.Segment.html "class in com.google.android.exoplayer2.source.hls.playlist")copyWith(long relativeStartTimeUs,
int relativeDiscontinuitySequence)