public final class

HlsMediaPlaylist.Segment

extends HlsMediaPlaylist.SegmentBase

 java.lang.Object

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

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

Overview

Media segment reference.

Summary

Fields
public final java.util.List<HlsMediaPlaylist.Part>parts

The parts belonging to this segment.

public final java.lang.Stringtitle

The human readable title of the segment.

from HlsMediaPlaylist.SegmentBasebyteRangeLength, byteRangeOffset, drmInitData, durationUs, encryptionIV, fullSegmentEncryptionKeyUri, hasGapTag, initializationSegment, relativeDiscontinuitySequence, relativeStartTimeUs, url
Constructors
publicSegment(java.lang.String url, HlsMediaPlaylist.Segment initializationSegment, java.lang.String title, long durationUs, int relativeDiscontinuitySequence, long relativeStartTimeUs, DrmInitData drmInitData, java.lang.String fullSegmentEncryptionKeyUri, java.lang.String encryptionIV, long byteRangeOffset, long byteRangeLength, boolean hasGapTag, java.util.List<HlsMediaPlaylist.Part> parts)

Creates an instance.

publicSegment(java.lang.String uri, long byteRangeOffset, long byteRangeLength, java.lang.String fullSegmentEncryptionKeyUri, java.lang.String encryptionIV)

Creates an instance to be used as init segment.

Methods
public HlsMediaPlaylist.SegmentcopyWith(long relativeStartTimeUs, int relativeDiscontinuitySequence)

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

Fields

public final java.lang.String title

The human readable title of the segment.

public final java.util.List<HlsMediaPlaylist.Part> parts

The parts belonging to this segment.

Constructors

public Segment(java.lang.String uri, long byteRangeOffset, long byteRangeLength, java.lang.String fullSegmentEncryptionKeyUri, java.lang.String 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(java.lang.String url, HlsMediaPlaylist.Segment initializationSegment, java.lang.String title, long durationUs, int relativeDiscontinuitySequence, long relativeStartTimeUs, DrmInitData drmInitData, java.lang.String fullSegmentEncryptionKeyUri, java.lang.String encryptionIV, long byteRangeOffset, long byteRangeLength, boolean hasGapTag, java.util.List<HlsMediaPlaylist.Part> parts)

Creates an instance.

Parameters:

url: See HlsMediaPlaylist.SegmentBase.url.
initializationSegment: See HlsMediaPlaylist.SegmentBase.initializationSegment.
title: See HlsMediaPlaylist.Segment.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 HlsMediaPlaylist.Segment.parts.

Methods

public HlsMediaPlaylist.Segment copyWith(long relativeStartTimeUs, int relativeDiscontinuitySequence)