The selectedIndex property of the ImageTrackList interface returns the index of the selected track.
selectedIndex
MDN Reference