const el = document.querySelector("video");
const tracks = el.videoTracks;VideoTrack / notebook
VideoTrack
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const firstTrack = tracks[0];for (const track of tracks) {
if (track.language === userLanguage) {
track.selected = true;
break;
}
}