public static final class Action.Seek extends Action
Player.seekTo(long) or Player.seekTo(int, long).Action.AddMediaItems, Action.ClearMediaItems, Action.ClearVideoSurface, Action.ExecuteRunnable, Action.MoveMediaItem, Action.PlayUntilPosition, Action.Prepare, Action.RemoveMediaItem, Action.RemoveMediaItems, Action.Seek, Action.SendMessages, Action.SetAudioAttributes, Action.SetMediaItems, Action.SetMediaItemsResetPosition, Action.SetPlaybackParameters, Action.SetPlayWhenReady, Action.SetRendererDisabled, Action.SetRepeatMode, Action.SetShuffleModeEnabled, Action.SetShuffleOrder, Action.SetVideoSurface, Action.Stop, Action.ThrowPlaybackException, Action.WaitForIsLoading, Action.WaitForMessage, Action.WaitForPendingPlayerCommands, Action.WaitForPlaybackState, Action.WaitForPlayWhenReady, Action.WaitForPositionDiscontinuity, Action.WaitForTimelineChanged| Constructor | Description |
|---|---|
Seek(String tag,
int windowIndex,
long positionMs,
boolean catchIllegalSeekException) |
Action calls
Player.seekTo(int, long). |
Seek(String tag,
long positionMs) |
Action calls
Player.seekTo(long). |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doActionImpl(SimpleExoPlayer player,
DefaultTrackSelector trackSelector,
Surface surface) |
Called by
Action.doActionAndScheduleNextImpl(SimpleExoPlayer, DefaultTrackSelector, Surface,
HandlerWrapper, ActionNode) to perform the action. |
doActionAndScheduleNext, doActionAndScheduleNextImplpublic Seek(String tag, long positionMs)
Player.seekTo(long).tag - A tag to use for logging.positionMs - The seek position.public Seek(String tag, int windowIndex, long positionMs, boolean catchIllegalSeekException)
Player.seekTo(int, long).tag - A tag to use for logging.windowIndex - The window to seek to.positionMs - The seek position.catchIllegalSeekException - Whether IllegalSeekPositionException should be
silently caught or not.protected void doActionImpl(SimpleExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface)
ActionAction.doActionAndScheduleNextImpl(SimpleExoPlayer, DefaultTrackSelector, Surface,
HandlerWrapper, ActionNode) to perform the action.doActionImpl in class Actionplayer - The player to which the action should be applied.trackSelector - The track selector to which the action should be applied.surface - The surface to use when applying actions, or null if no surface is
needed.