public final class

Action.Seek

extends Action

 java.lang.Object

androidx.media3.test.utils.Action

↳androidx.media3.test.utils.Action.Seek

Overview

Calls Player.seekTo(long) or Player.seekTo(int, long).

Summary

Constructors
publicSeek(java.lang.String tag, int mediaItemIndex, long positionMs, boolean catchIllegalSeekException)

Action calls Player.seekTo(int, long).

publicSeek(java.lang.String tag, long positionMs)

Action calls Player.seekTo(long).

Methods
protected abstract voiddoActionImpl(ExoPlayer player, DefaultTrackSelector trackSelector, Surface surface)

Called by Action to perform the action.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Seek(java.lang.String tag, long positionMs)

Action calls Player.seekTo(long).

Parameters:

tag: A tag to use for logging.
positionMs: The seek position.

public Seek(java.lang.String 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.

Methods

protected abstract void doActionImpl(ExoPlayer player, DefaultTrackSelector trackSelector, Surface surface)

Called by Action to perform the action.

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, or null if no surface is needed.