जब <track> एलिमेंट में क्यू (कैप्शन/सबटाइटल सेगमेंट) बदलता है, तो oncuechange एट्रिब्यूट ट्रिगर होता है। यह लाइव कैप्शन अपडेट, सबटाइटल सिंक, या चैप्टर नेविगेशन के लिए उपयोगी है।
<video> <track oncuechange="alert('बदला गया!')"> </video>
उदाहरण
<!DOCTYPE HTML> <html>
<body>
<video width="300" height="200" controls autoplay>
<source src="/html5/foo.ogg" type="video/ogg" />
<source src="/html5/foo.mp4" type="video/mp4" />
<track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English" oncuechange="alert('बदला गया!')">
आपका ब्राउज़र वीडियो एलिमेंट सपोर्ट नहीं करता।
</video>
</body>
</html>
नोट: track एलिमेंट पर cuechange इवेंट, TextTrack ऑब्जेक्ट के activeCues बदलने पर फायर होता है।