public final class Action.Seek extends Action


Calls seekTo or seekTo.

Summary

Public constructors

Seek(@Size(max = 23) String tag, long positionMs)

Action calls seekTo.

Seek(
    String tag,
    int mediaItemIndex,
    long positionMs,
    boolean catchIllegalSeekException
)

Action calls seekTo.

Protected methods

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

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

Seek

public Seek(@Size(max = 23) String tag, long positionMs)

Action calls seekTo.

Parameters
@Size(max = 23) String tag

A tag to use for logging.

long positionMs

The seek position.

Seek

public Seek(
    String tag,
    int mediaItemIndex,
    long positionMs,
    boolean catchIllegalSeekException
)

Action calls seekTo.

Parameters
String tag

A tag to use for logging.

int mediaItemIndex

The media item to seek to.

long positionMs

The seek position.

boolean catchIllegalSeekException

Whether IllegalSeekPositionException should be silently caught or not.

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.