Action.SendMessages


public final class Action.SendMessages extends Action


Calls createMessage and send.

Summary

Public constructors

SendMessages(
    @Size(max = 23) String tag,
    PlayerMessage.Target target,
    long positionMs
)
SendMessages(
    String tag,
    PlayerMessage.Target target,
    int mediaItemIndex,
    long positionMs,
    boolean deleteAfterDelivery
)

Protected methods

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

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

SendMessages

public SendMessages(
    @Size(max = 23) String tag,
    PlayerMessage.Target target,
    long positionMs
)
Parameters
@Size(max = 23) String tag

A tag to use for logging.

PlayerMessage.Target target

A message target.

long positionMs

The position at which the message should be sent, in milliseconds.

SendMessages

public SendMessages(
    String tag,
    PlayerMessage.Target target,
    int mediaItemIndex,
    long positionMs,
    boolean deleteAfterDelivery
)
Parameters
String tag

A tag to use for logging.

PlayerMessage.Target target

A message target.

int mediaItemIndex

The media item index at which the message should be sent, or INDEX_UNSET for the current media item.

long positionMs

The position at which the message should be sent, in milliseconds.

boolean deleteAfterDelivery

Whether the message will be deleted after delivery.

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.