# Action.SetMediaItemsResetPosition

Artifact: [androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/Action.java+class:androidx.media3.test.utils.Action.SetMediaItemsResetPosition)

*** ** * ** ***


```
public final class Action.SetMediaItemsResetPosition extends Action
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.media3.test.utils.Action](https://developer.android.com/reference/androidx/media3/test/utils/Action) ||
|   | ↳ | [androidx.media3.test.utils.Action.SetMediaItemsResetPosition](https://developer.android.com/reference/androidx/media3/test/utils/Action.SetMediaItemsResetPosition) |

*** ** * ** ***

Calls `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setMediaSources(java.util.List<androidx.media3.exoplayer.source.MediaSource>,boolean)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/Action.SetMediaItemsResetPosition#SetMediaItemsResetPosition(java.lang.String,boolean,androidx.media3.exoplayer.source.MediaSource...)( https://developer.android.com/reference/java/lang/String.html tag, boolean resetPosition, MediaSource[] mediaSources )` |

| ### Protected methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/Action.SetMediaItemsResetPosition#doActionImpl(androidx.media3.exoplayer.ExoPlayer,androidx.media3.exoplayer.trackselection.DefaultTrackSelector,android.view.Surface)( https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer player, https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/DefaultTrackSelector trackSelector, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Surface.html surface )` Called by `https://developer.android.com/reference/androidx/media3/test/utils/Action#doActionAndScheduleNextImpl(androidx.media3.exoplayer.ExoPlayer,androidx.media3.exoplayer.trackselection.DefaultTrackSelector,android.view.Surface,androidx.media3.common.util.HandlerWrapper,androidx.media3.test.utils.ActionSchedule.ActionNode)` to perform the action. |

## Public constructors

### SetMediaItemsResetPosition

```
public SetMediaItemsResetPosition(
    String tag,
    boolean resetPosition,
    MediaSource[] mediaSources
)
```

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html tag` | A tag to use for logging. |
| `boolean resetPosition` | Whether the position should be reset. |
| `MediaSource[] mediaSources` | The media sources to populate the playlist with. |

## Protected methods

### doActionImpl

```
protected void doActionImpl(
    ExoPlayer player,
    DefaultTrackSelector trackSelector,
    @Nullable Surface surface
)
```

Called by `https://developer.android.com/reference/androidx/media3/test/utils/Action#doActionAndScheduleNextImpl(androidx.media3.exoplayer.ExoPlayer,androidx.media3.exoplayer.trackselection.DefaultTrackSelector,android.view.Surface,androidx.media3.common.util.HandlerWrapper,androidx.media3.test.utils.ActionSchedule.ActionNode)` to perform the action.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer player` | The player to which the action should be applied. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/DefaultTrackSelector trackSelector` | The track selector to which the action should be applied. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Surface.html surface` | The surface to use when applying actions, or `null` if no surface is needed. |