Action.WaitForMessage


public final class Action.WaitForMessage extends Action


Waits for a player message to arrive. If the target already received a message, the action returns immediately.

Summary

Public constructors

WaitForMessage(
    @Size(max = 23) String tag,
    ActionSchedule.PlayerTarget playerTarget
)

Protected methods

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

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

WaitForMessage

public WaitForMessage(
    @Size(max = 23) String tag,
    ActionSchedule.PlayerTarget playerTarget
)
Parameters
@Size(max = 23) String tag

A tag to use for logging.

ActionSchedule.PlayerTarget playerTarget

The target to observe.

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.