This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

getCueById

Summary

Returns the first text track cue object (in text track cue order) with text track cue identifier matching id. Returns null if no cue has the given identifier or if the “id” argument is the empty string.

Method of apis/audio-video/TextTrackCueListapis/audio-video/TextTrackCueList

Syntax

var object = TextTrackCueList.getCueById(idString);

Parameters

idString

Data-type
Blob

id for a specific TextTrackCue .

Return Value

Returns an object of type DOM NodeDOM Node

Examples

//. . .
var myTrack = document.getElementById("entrack").track; // get text track from track element
var myCues = myTrack.cues;   // get list of cues
// get a specific TextTrackCue by ID
var myCueObj = myCues.getCueById("CID3");
//. . .

Related specifications

W3C HTML5 Specification
W3C Editor’s Draft

Attributions