---
title: VideoTrackList.selectedIndex
slug: Web/API/VideoTrackList/selectedIndex
tags:
  - API
  - HTML DOM
  - Media
  - Property
  - Read-only
  - Reference
  - Video
  - VideoTrackList
  - track
browser-compat: api.VideoTrackList.selectedIndex
---
{{APIRef("HTML DOM")}}

The read-only **{{domxref("VideoTrackList")}}**
property **`selectedIndex`** returns the index of the
currently selected track, if any, or `-1` otherwise.

## Syntax

```js
var index = VideoTrackList.selectedIndex;
```

### Value

A number indicating the index of the currently selected track, if any, or
`-1` otherwise.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
