FakeTimeline.TimelineWindowDefinition


class FakeTimeline.TimelineWindowDefinition


Definition used to define a FakeTimeline.

Summary

Constants

const Long

Default window duration in microseconds.

const Long

Default offset of a window in its first period in microseconds.

Public constructors

TimelineWindowDefinition(periodCount: Int, id: Any!)

Creates a seekable, non-dynamic window definition with a duration of DEFAULT_WINDOW_DURATION_US.

TimelineWindowDefinition(
    isSeekable: Boolean,
    isDynamic: Boolean,
    durationUs: Long
)

Creates a window definition with one period.

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    durationUs: Long
)

Creates a window definition.

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    durationUs: Long,
    adPlaybackState: AdPlaybackState!
)

Creates a window definition with ad groups.

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    isLive: Boolean,
    isPlaceholder: Boolean,
    durationUs: Long,
    defaultPositionUs: Long,
    windowOffsetInFirstPeriodUs: Long,
    adPlaybackState: AdPlaybackState!
)

Creates a window definition with ad groups.

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    isLive: Boolean,
    isPlaceholder: Boolean,
    durationUs: Long,
    defaultPositionUs: Long,
    windowOffsetInFirstPeriodUs: Long,
    adPlaybackState: AdPlaybackState!,
    mediaItem: MediaItem!
)

This function is deprecated.

Use TimelineWindowDefinition instead.

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    isLive: Boolean,
    isPlaceholder: Boolean,
    durationUs: Long,
    defaultPositionUs: Long,
    windowOffsetInFirstPeriodUs: Long,
    adPlaybackStates: (Mutable)List<AdPlaybackState!>!,
    mediaItem: MediaItem!
)

Creates a window definition with ad groups and a custom media item.

Public functions

java-static FakeTimeline.TimelineWindowDefinition!

Creates a window definition that corresponds to a placeholder timeline using the given tag.

Constants

DEFAULT_WINDOW_DURATION_US

const val DEFAULT_WINDOW_DURATION_US = 10000000: Long

Default window duration in microseconds.

DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US

const val DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US = 123000000: Long

Default offset of a window in its first period in microseconds.

Public constructors

TimelineWindowDefinition

TimelineWindowDefinition(periodCount: Int, id: Any!)

Creates a seekable, non-dynamic window definition with a duration of DEFAULT_WINDOW_DURATION_US.

Parameters
periodCount: Int

The number of periods in the window. Each period get an equal slice of the total window duration.

id: Any!

The UID of the window.

TimelineWindowDefinition

TimelineWindowDefinition(
    isSeekable: Boolean,
    isDynamic: Boolean,
    durationUs: Long
)

Creates a window definition with one period.

Parameters
isSeekable: Boolean

Whether the window is seekable.

isDynamic: Boolean

Whether the window is dynamic.

durationUs: Long

The duration of the window in microseconds.

TimelineWindowDefinition

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    durationUs: Long
)

Creates a window definition.

Parameters
periodCount: Int

The number of periods in the window. Each period get an equal slice of the total window duration.

id: Any!

The UID of the window.

isSeekable: Boolean

Whether the window is seekable.

isDynamic: Boolean

Whether the window is dynamic.

durationUs: Long

The duration of the window in microseconds.

TimelineWindowDefinition

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    durationUs: Long,
    adPlaybackState: AdPlaybackState!
)

Creates a window definition with ad groups.

Parameters
periodCount: Int

The number of periods in the window. Each period get an equal slice of the total window duration.

id: Any!

The UID of the window.

isSeekable: Boolean

Whether the window is seekable.

isDynamic: Boolean

Whether the window is dynamic.

durationUs: Long

The duration of the window in microseconds.

adPlaybackState: AdPlaybackState!

The ad playback state.

TimelineWindowDefinition

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    isLive: Boolean,
    isPlaceholder: Boolean,
    durationUs: Long,
    defaultPositionUs: Long,
    windowOffsetInFirstPeriodUs: Long,
    adPlaybackState: AdPlaybackState!
)

Creates a window definition with ad groups.

Parameters
periodCount: Int

The number of periods in the window. Each period get an equal slice of the total window duration.

id: Any!

The UID of the window.

isSeekable: Boolean

Whether the window is seekable.

isDynamic: Boolean

Whether the window is dynamic.

isLive: Boolean

Whether the window is live.

isPlaceholder: Boolean

Whether the window is a placeholder.

durationUs: Long

The duration of the window in microseconds.

defaultPositionUs: Long

The default position of the window in microseconds.

windowOffsetInFirstPeriodUs: Long

The offset of the window in the first period, in microseconds.

adPlaybackState: AdPlaybackState!

The ad playback state.

TimelineWindowDefinition

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    isLive: Boolean,
    isPlaceholder: Boolean,
    durationUs: Long,
    defaultPositionUs: Long,
    windowOffsetInFirstPeriodUs: Long,
    adPlaybackState: AdPlaybackState!,
    mediaItem: MediaItem!
)

TimelineWindowDefinition

TimelineWindowDefinition(
    periodCount: Int,
    id: Any!,
    isSeekable: Boolean,
    isDynamic: Boolean,
    isLive: Boolean,
    isPlaceholder: Boolean,
    durationUs: Long,
    defaultPositionUs: Long,
    windowOffsetInFirstPeriodUs: Long,
    adPlaybackStates: (Mutable)List<AdPlaybackState!>!,
    mediaItem: MediaItem!
)

Creates a window definition with ad groups and a custom media item.

Parameters
periodCount: Int

The number of periods in the window. Each period get an equal slice of the total window duration.

id: Any!

The UID of the window.

isSeekable: Boolean

Whether the window is seekable.

isDynamic: Boolean

Whether the window is dynamic.

isLive: Boolean

Whether the window is live.

isPlaceholder: Boolean

Whether the window is a placeholder.

durationUs: Long

The duration of the window in microseconds.

defaultPositionUs: Long

The default position of the window in microseconds.

windowOffsetInFirstPeriodUs: Long

The offset of the window in the first period, in microseconds.

adPlaybackStates: (Mutable)List<AdPlaybackState!>!

The ad playback states for the periods.

mediaItem: MediaItem!

The media item to include in the timeline.

Public functions

createPlaceholder

java-static fun createPlaceholder(tag: Any!): FakeTimeline.TimelineWindowDefinition!

Creates a window definition that corresponds to a placeholder timeline using the given tag.

Parameters
tag: Any!

The tag to use in the timeline.

Public properties

adPlaybackStates

val adPlaybackStates: (Mutable)List<AdPlaybackState!>!

defaultPositionUs

val defaultPositionUsLong

durationUs

val durationUsLong

id

val idAny!

isDynamic

val isDynamicBoolean

isLive

val isLiveBoolean

isPlaceholder

val isPlaceholderBoolean

isSeekable

val isSeekableBoolean

mediaItem

val mediaItemMediaItem!

periodCount

val periodCountInt

windowOffsetInFirstPeriodUs

val windowOffsetInFirstPeriodUsLong