Class Action.Seek
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.Action
-
- com.google.android.exoplayer2.testutil.Action.Seek
-
- Enclosing class:
- Action
public static final class Action.Seek extends Action
CallsPlayer.seekTo(long)
orPlayer.seekTo(int, long)
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.testutil.Action
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 Summary
Constructors Constructor Description Seek(String tag, int mediaItemIndex, long positionMs, boolean catchIllegalSeekException)
Action callsPlayer.seekTo(int, long)
.Seek(String tag, long positionMs)
Action callsPlayer.seekTo(long)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doActionImpl(ExoPlayer player, DefaultTrackSelector trackSelector, Surface surface)
Called byAction.doActionAndScheduleNextImpl(ExoPlayer, DefaultTrackSelector, Surface, HandlerWrapper, ActionNode)
to perform the action.
-
-
-
Constructor Detail
-
Seek
public Seek(@Size(max=23L) String tag, long positionMs)
Action callsPlayer.seekTo(long)
.- Parameters:
tag
- A tag to use for logging.positionMs
- The seek position.
-
Seek
public Seek(String tag, int mediaItemIndex, long positionMs, boolean catchIllegalSeekException)
Action callsPlayer.seekTo(int, long)
.- Parameters:
tag
- A tag to use for logging.mediaItemIndex
- The media item to seek to.positionMs
- The seek position.catchIllegalSeekException
- WhetherIllegalSeekPositionException
should be silently caught or not.
-
-
Method Detail
-
doActionImpl
protected void doActionImpl(ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface)
Description copied from class:Action
Called byAction.doActionAndScheduleNextImpl(ExoPlayer, DefaultTrackSelector, Surface, HandlerWrapper, ActionNode)
to perform the action.- Specified by:
doActionImpl
in classAction
- Parameters:
player
- 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, ornull
if no surface is needed.
-
-