---
title: ImageTrackList.selectedIndex
slug: Web/API/ImageTrackList/selectedIndex
tags:
  - API
  - Property
  - Reference
  - selectedIndex
  - ImageTrackList
browser-compat: api.ImageTrackList.selectedIndex
---
{{DefaultAPISidebar("WebCodecs API")}}

The **`selectedIndex`** property of the {{domxref("ImageTrackList")}} interface returns the `index` of the selected track.

### Value

An integer.

## Examples

The following example prints the value of `selectedIndex` to the console.

```js
let tracks = imageDecoder.tracks;
console.log(tracks.selectedIndex);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
