public final class

Action.SetMediaItems

extends Action

 java.lang.Object

androidx.media3.test.utils.Action

↳androidx.media3.test.utils.Action.SetMediaItems

Overview

Calls ExoPlayer.setMediaSources(List, int, long).

Summary

Constructors
publicSetMediaItems(java.lang.String tag, int mediaItemIndex, long positionMs, MediaSource mediaSources[])

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 SetMediaItems(java.lang.String tag, int mediaItemIndex, long positionMs, MediaSource mediaSources[])

Parameters:

tag: A tag to use for logging.
mediaItemIndex: The media item index to start playback from.
positionMs: The position in milliseconds to start playback from.
mediaSources: The media sources to populate the playlist with.

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.