The read-only VideoTrackList property selectedIndex returns the index of the currently selected track, if any, or -1 otherwise.
var index = VideoTrackList.selectedIndex;
A number indicating the index of the currently selected track, if any, or -1 otherwise.
| Specification | Status | Comment |
|---|---|---|
| HTML Living Standard The definition of 'VideoTrackList: selectedIndex' in that specification. | Living Standard |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 45
|
12 | 33
|
10 | 32
|
6.1 |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | ? | 45
|
Yes | 33
|
32
|
7.1 | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/selectedIndex