Removes the given cue from textTrack’s text track list of cues.
Method of apis/audio-video/TextTrackapis/audio-video/TextTrack
Syntaxvar = TextTrack.removeCue(cue);
Parameters cue
“cue” is of type TextTrackCue.
Return ValueReturns an object of type
Examples<!DOCTYPE html >
<html >
<head>
<title>Remove Cue example</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<video id="video1" controls muted autoplay>
<source src="video.mp4">
HTML5 Video not supported
</video>
<script type="text/javascript">
var video = document.getElementById("video1");
var beginTime, endTime, message;
var newTextTrack = video.addTextTrack("captions", "sample");
newTextTrack.mode = newTextTrack.SHOWING;
for(var i=0;i<10;i++){
beginTime = i * 5 ;
endTime = ( (i * 5) + 5);
message = "This is number " + i;
newTextTrack.addCue(new TextTrackCue(beginTime, endTime, message));
}
newTextTrack.addEventListener("cuechange", function () {
var currentCue = newTextTrack.activeCues[0];
if (currentCue.text == "This is number 2") {
newTextTrack.removeCue(currentCue)
}
},false);
</script>
</body>
</html>
Related specifications
Microsoft Developer Network: Windows Internet Explorer API reference Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4