HlsMediaPlaylist.Part


public final class HlsMediaPlaylist.Part extends HlsMediaPlaylist.SegmentBase


A media part.

Summary

Public fields

final boolean

Whether the part is independent.

final boolean

Whether the part is a preloading part.

Public constructors

Part(
    String url,
    @Nullable HlsMediaPlaylist.Segment initializationSegment,
    long durationUs,
    int relativeDiscontinuitySequence,
    long relativeStartTimeUs,
    @Nullable DrmInitData drmInitData,
    @Nullable String fullSegmentEncryptionKeyUri,
    @Nullable String encryptionIV,
    long byteRangeOffset,
    long byteRangeLength,
    boolean hasGapTag,
    boolean isIndependent,
    boolean isPreload
)

Creates an instance.

Public methods

HlsMediaPlaylist.Part
copyWith(long relativeStartTimeUs, int relativeDiscontinuitySequence)

Inherited fields

From androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.SegmentBase
final long

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

final long

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

final @Nullable DrmInitData

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

final long

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

final @Nullable String

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

final @Nullable String

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.

final boolean

Whether the segment is marked as a gap.

final @Nullable HlsMediaPlaylist.Segment

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

final int

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

final long

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

final String

The url of the segment.

Inherited methods

From java.lang.Comparable
abstract int
compareTo(T p)
From androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.SegmentBase
int
compareTo(Long relativeStartTimeUs)

Public fields

isIndependent

public final boolean isIndependent

Whether the part is independent.

isPreload

public final boolean isPreload

Whether the part is a preloading part.

Public constructors

Part

public Part(
    String url,
    @Nullable HlsMediaPlaylist.Segment initializationSegment,
    long durationUs,
    int relativeDiscontinuitySequence,
    long relativeStartTimeUs,
    @Nullable DrmInitData drmInitData,
    @Nullable String fullSegmentEncryptionKeyUri,
    @Nullable String encryptionIV,
    long byteRangeOffset,
    long byteRangeLength,
    boolean hasGapTag,
    boolean isIndependent,
    boolean isPreload
)

Creates an instance.

Parameters
String url

See url.

@Nullable HlsMediaPlaylist.Segment initializationSegment

See initializationSegment.

long durationUs

See durationUs.

int relativeDiscontinuitySequence

See relativeDiscontinuitySequence.

long relativeStartTimeUs

See relativeStartTimeUs.

@Nullable DrmInitData drmInitData

See drmInitData.

@Nullable String fullSegmentEncryptionKeyUri

See fullSegmentEncryptionKeyUri.

@Nullable String encryptionIV

See encryptionIV.

long byteRangeOffset

See byteRangeOffset.

long byteRangeLength

See byteRangeLength.

boolean hasGapTag

See hasGapTag.

boolean isIndependent

See isIndependent.

boolean isPreload

See isPreload.

Public methods

copyWith

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