This feature is not Baseline because it does not work in some of the most widely-used browsers.
The read-only VideoTrackList property selectedIndex returns the index of the currently selected track, if any, or -1 otherwise.
A number indicating the index of the currently selected track, if any, or -1 otherwise.
| Specification |
|---|
| HTML> # dom-videotracklist-selectedindex-dev> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
selectedIndex |
37 | 7912–79 | 33 | 24 | 7 | 37 | No | No | 7 | No | No | 7 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/selectedIndex