Back to Exoplayer

Action.Seek (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/Action.Seek.html

latest5.2 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class Action.Seek


public static final classAction.Seekextends[Action](Action.html "class in com.google.android.exoplayer2.testutil")

Calls Player.seekTo(long) or Player.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 calls Player.seekTo(int, long). | | Seek​(String tag, long positionMs) | Action calls Player.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 by Action.doActionAndScheduleNextImpl(ExoPlayer, DefaultTrackSelector, Surface, HandlerWrapper, ActionNode) to perform the action. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Seek

public Seek​(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,
            long positionMs)

Action calls Player.seekTo(long). Parameters:tag - A tag to use for logging.positionMs - The seek position.

- 

Seek

public Seek​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,
            int mediaItemIndex,
            long positionMs,
            boolean catchIllegalSeekException)

Action calls Player.seekTo(int, long). Parameters:tag - A tag to use for logging.mediaItemIndex - The media item to seek to.positionMs - The seek position.catchIllegalSeekException - Whether IllegalSeekPositionException should be silently caught or not.

Method Detail

- 

doActionImpl

protected void doActionImpl​([ExoPlayer](../ExoPlayer.html "interface in com.google.android.exoplayer2")player,[DefaultTrackSelector](../trackselection/DefaultTrackSelector.html "class in com.google.android.exoplayer2.trackselection")trackSelector,
                            @Nullable[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")surface)

Description copied from class: Action

Called by Action.doActionAndScheduleNextImpl(ExoPlayer, DefaultTrackSelector, Surface, HandlerWrapper, ActionNode) to perform the action. Specified by:doActionImpl in class ActionParameters: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, or null if no surface is needed.