MDN self-hosted library · e01.org

TextTrack: cuechange event

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

js
track.addEventListener("cuechange", () => {
  const cues = track.activeCues; // array of current cues
  // …
});
js
track.oncuechange = (event) => {
  let cues = track.activeCues; // array of current cues
};