HTML oncuechange Event Attribute
Description
The oncuechange event attribute is used on the <track> element and runs a script when the active cues of a text track change: when a subtitle, caption or chapter cue starts or stops being displayed during playback of a <video> or <audio> element.
The same event also fires on the track's TextTrack object (track.track.oncuechange). Inside the handler, this.track.activeCues holds the cues that are currently active, so the text can be shown in a custom caption area, used to highlight a transcript, or used to update the page when a new chapter begins.
The event only fires for tracks whose mode is "showing" or "hidden"; a disabled track does not fire it. Set mode to "hidden" to receive the events without the browser drawing the captions itself.
Syntax
<track oncuechange="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML oncuechange event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





