Action.WaitForTimelineChanged


class Action.WaitForTimelineChanged : Action


Waits for onTimelineChanged.

Summary

Public constructors

Creates action waiting for any timeline change for any reason.

WaitForTimelineChanged(
    tag: String!,
    expectedTimeline: Timeline?,
    @Player.TimelineChangeReason expectedReason: Int
)

Creates action waiting for a timeline change for a given reason.

Protected functions

Unit
doActionImpl(
    player: ExoPlayer!,
    trackSelector: DefaultTrackSelector!,
    surface: Surface?
)

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

WaitForTimelineChanged

WaitForTimelineChanged(tag: String!)

Creates action waiting for any timeline change for any reason.

Parameters
tag: String!

A tag to use for logging.

WaitForTimelineChanged

WaitForTimelineChanged(
    tag: String!,
    expectedTimeline: Timeline?,
    @Player.TimelineChangeReason expectedReason: Int
)

Creates action waiting for a timeline change for a given reason.

Parameters
tag: String!

A tag to use for logging.

expectedTimeline: Timeline?

The expected timeline or null if any timeline change is relevant.

@Player.TimelineChangeReason expectedReason: Int

The expected timeline change reason.

Protected functions

doActionImpl

protected fun doActionImpl(
    player: ExoPlayer!,
    trackSelector: DefaultTrackSelector!,
    surface: Surface?
): Unit

Called by doActionAndScheduleNextImpl to perform the action.

Parameters
player: ExoPlayer!

The player to which the action should be applied.

trackSelector: DefaultTrackSelector!

The track selector to which the action should be applied.

surface: Surface?

The surface to use when applying actions, or null if no surface is needed.