Action.WaitForPlayWhenReady


public final class Action.WaitForPlayWhenReady extends Action


Waits for a specified playWhenReady value, returning either immediately or after a call to onPlayWhenReadyChanged.

Summary

Public constructors

WaitForPlayWhenReady(@Size(max = 23) String tag, boolean playWhenReady)

Protected methods

void
doActionImpl(
    ExoPlayer player,
    DefaultTrackSelector trackSelector,
    @Nullable Surface surface
)

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

WaitForPlayWhenReady

public WaitForPlayWhenReady(@Size(max = 23) String tag, boolean playWhenReady)
Parameters
@Size(max = 23) String tag

A tag to use for logging.

boolean playWhenReady

The playWhenReady value to wait for.

Protected methods

doActionImpl

protected void doActionImpl(
    ExoPlayer player,
    DefaultTrackSelector trackSelector,
    @Nullable Surface surface
)

Called by doActionAndScheduleNextImpl to perform the action.

Parameters
ExoPlayer player

The player to which the action should be applied.

DefaultTrackSelector trackSelector

The track selector to which the action should be applied.

@Nullable Surface surface

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