Action.WaitForPlaybackState


class Action.WaitForPlaybackState : Action


Waits for a specified playback state, returning either immediately or after a call to onPlaybackStateChanged.

Summary

Public constructors

WaitForPlaybackState(
    tag: @Size(max = 23) String!,
    @Player.State targetPlaybackState: Int
)

Protected functions

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

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

WaitForPlaybackState

WaitForPlaybackState(
    tag: @Size(max = 23) String!,
    @Player.State targetPlaybackState: Int
)
Parameters
tag: @Size(max = 23) String!

A tag to use for logging.

@Player.State targetPlaybackState: Int

The playback state to wait for.

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.