MDN self-hosted library · e01.org
AudioTrack / notebook

AudioTrack

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const el = document.querySelector("video");
const tracks = el.audioTracks;
js
const firstTrack = tracks[0];
js
tracks.forEach((track) => {
  track.enabled = track.language === userLanguage;
});