---
title: changeToMediaAtIndex
framework: tvmljs
role: symbol
role_heading: Instance Method
path: tvmljs/player/1682100-changetomediaatindex
---

# changeToMediaAtIndex

Immediately begins playing the media item at the specified index in the playlist.

## Declaration

```data
void changeToMediaAtIndex(
    in int index
);
```

## Parameters

- `index`: An integer indicating a position in the playlist.

## See Also

### Controlling Playback

- [pause](tvmljs/player/1627417-pause.md)
- [next](tvmljs/player/1682103-next.md)
- [play](tvmljs/player/1627432-play.md)
- [playbackState](tvmljs/player/1627387-playbackstate.md)
- [playbackRate](tvmljs/player/1682104-playbackrate.md)
- [previous](tvmljs/player/1682106-previous.md)
- [seekToTime](tvmljs/player/1627368-seektotime.md)
- [stop](tvmljs/player/1627406-stop.md)
