HlsMediaPlaylist.Part


class HlsMediaPlaylist.Part : HlsMediaPlaylist.SegmentBase


A media part.

Summary

Public constructors

Part(
    url: String!,
    initializationSegment: HlsMediaPlaylist.Segment?,
    durationUs: Long,
    relativeDiscontinuitySequence: Int,
    relativeStartTimeUs: Long,
    drmInitData: DrmInitData?,
    fullSegmentEncryptionKeyUri: String?,
    encryptionIV: String?,
    byteRangeOffset: Long,
    byteRangeLength: Long,
    hasGapTag: Boolean,
    isIndependent: Boolean,
    isPreload: Boolean
)

Creates an instance.

Public functions

HlsMediaPlaylist.Part!
copyWith(relativeStartTimeUs: Long, relativeDiscontinuitySequence: Int)

Public properties

Boolean

Whether the part is independent.

Boolean

Whether the part is a preloading part.

Inherited functions

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

Inherited properties

From androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.SegmentBase
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.

Long

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

DrmInitData?

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

Long

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

String?

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

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.

Boolean

Whether the segment is marked as a gap.

HlsMediaPlaylist.Segment?

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

Int

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

Long

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

String!

The url of the segment.

Public constructors

Part

Part(
    url: String!,
    initializationSegment: HlsMediaPlaylist.Segment?,
    durationUs: Long,
    relativeDiscontinuitySequence: Int,
    relativeStartTimeUs: Long,
    drmInitData: DrmInitData?,
    fullSegmentEncryptionKeyUri: String?,
    encryptionIV: String?,
    byteRangeOffset: Long,
    byteRangeLength: Long,
    hasGapTag: Boolean,
    isIndependent: Boolean,
    isPreload: Boolean
)

Creates an instance.

Parameters
url: String!

See url.

initializationSegment: HlsMediaPlaylist.Segment?

See initializationSegment.

durationUs: Long

See durationUs.

relativeDiscontinuitySequence: Int

See relativeDiscontinuitySequence.

relativeStartTimeUs: Long

See relativeStartTimeUs.

drmInitData: DrmInitData?

See drmInitData.

fullSegmentEncryptionKeyUri: String?

See fullSegmentEncryptionKeyUri.

encryptionIV: String?

See encryptionIV.

byteRangeOffset: Long

See byteRangeOffset.

byteRangeLength: Long

See byteRangeLength.

hasGapTag: Boolean

See hasGapTag.

isIndependent: Boolean

See isIndependent.

isPreload: Boolean

See isPreload.

Public functions

copyWith

fun copyWith(relativeStartTimeUs: Long, relativeDiscontinuitySequence: Int): HlsMediaPlaylist.Part!

Public properties

isIndependent

val isIndependentBoolean

Whether the part is independent.

isPreload

val isPreloadBoolean

Whether the part is a preloading part.