MediaSource.MediaPeriodId


@UnstableApi
class MediaSource.MediaPeriodId


Identifier for a MediaPeriod.

Summary

Public constructors

MediaPeriodId(periodUid: Any!)

Creates a media period identifier for a period which is not part of a buffered sequence of windows.

MediaPeriodId(periodUid: Any!, windowSequenceNumber: Long)

Creates a media period identifier for the specified period in the timeline.

MediaPeriodId(
    periodUid: Any!,
    windowSequenceNumber: Long,
    nextAdGroupIndex: Int
)

Creates a media period identifier for the specified clipped period in the timeline.

MediaPeriodId(
    periodUid: Any!,
    adGroupIndex: Int,
    adIndexInAdGroup: Int,
    windowSequenceNumber: Long
)

Creates a media period identifier that identifies an ad within an ad group at the specified timeline period.

Public functions

MediaSource.MediaPeriodId!
copyWithPeriodUid(newPeriodUid: Any!)

Returns a copy of this period identifier but with newPeriodUid as its period uid.

MediaSource.MediaPeriodId!
copyWithWindowSequenceNumber(windowSequenceNumber: Long)

Returns a copy of this period identifier with a new windowSequenceNumber.

Boolean
equals(obj: Any?)
Int
Boolean

Returns whether this period identifier identifies an ad in an ad group in a period.

Public properties

Int

If the media period is in an ad group, the index of the ad group in the period.

Int

If the media period is in an ad group, the index of the ad in its ad group in the period.

Int

The index of the next ad group to which the media period's content is clipped, or INDEX_UNSET if there is no following ad group or if this media period is an ad.

Any!

The unique id of the timeline period.

Long

The sequence number of the window in the buffered sequence of windows this media period is part of.

Public constructors

MediaPeriodId

MediaPeriodId(periodUid: Any!)

Creates a media period identifier for a period which is not part of a buffered sequence of windows.

Parameters
periodUid: Any!

The unique id of the timeline period.

MediaPeriodId

MediaPeriodId(periodUid: Any!, windowSequenceNumber: Long)

Creates a media period identifier for the specified period in the timeline.

Parameters
periodUid: Any!

The unique id of the timeline period.

windowSequenceNumber: Long

The sequence number of the window in the buffered sequence of windows this media period is part of.

MediaPeriodId

MediaPeriodId(
    periodUid: Any!,
    windowSequenceNumber: Long,
    nextAdGroupIndex: Int
)

Creates a media period identifier for the specified clipped period in the timeline.

Parameters
periodUid: Any!

The unique id of the timeline period.

windowSequenceNumber: Long

The sequence number of the window in the buffered sequence of windows this media period is part of.

nextAdGroupIndex: Int

The index of the next ad group to which the media period's content is clipped.

MediaPeriodId

MediaPeriodId(
    periodUid: Any!,
    adGroupIndex: Int,
    adIndexInAdGroup: Int,
    windowSequenceNumber: Long
)

Creates a media period identifier that identifies an ad within an ad group at the specified timeline period.

Parameters
periodUid: Any!

The unique id of the timeline period that contains the ad group.

adGroupIndex: Int

The index of the ad group.

adIndexInAdGroup: Int

The index of the ad in the ad group.

windowSequenceNumber: Long

The sequence number of the window in the buffered sequence of windows this media period is part of.

Public functions

copyWithPeriodUid

fun copyWithPeriodUid(newPeriodUid: Any!): MediaSource.MediaPeriodId!

Returns a copy of this period identifier but with newPeriodUid as its period uid.

copyWithWindowSequenceNumber

fun copyWithWindowSequenceNumber(windowSequenceNumber: Long): MediaSource.MediaPeriodId!

Returns a copy of this period identifier with a new windowSequenceNumber.

equals

fun equals(obj: Any?): Boolean

hashCode

fun hashCode(): Int

isAd

fun isAd(): Boolean

Returns whether this period identifier identifies an ad in an ad group in a period.

Public properties

adGroupIndex

val adGroupIndexInt

If the media period is in an ad group, the index of the ad group in the period. INDEX_UNSET otherwise.

adIndexInAdGroup

val adIndexInAdGroupInt

If the media period is in an ad group, the index of the ad in its ad group in the period. INDEX_UNSET otherwise.

nextAdGroupIndex

val nextAdGroupIndexInt

The index of the next ad group to which the media period's content is clipped, or INDEX_UNSET if there is no following ad group or if this media period is an ad.

periodUid

val periodUidAny!

The unique id of the timeline period.

windowSequenceNumber

val windowSequenceNumberLong

The sequence number of the window in the buffered sequence of windows this media period is part of. INDEX_UNSET if the media period id is not part of a buffered sequence of windows.