GO-V.ORG
As seen in

TextTrackCue: endTime property

WebVTT

WebVTT

The **`endTime`** property of the TextTrackCue interface returns and sets the end time of the cue.

## Value

A number representing the end time, in seconds.

## Examples

In the following example a new VTTCue (which inherits from `TextTrackCue`) is created starting at 0.1 second and ending at 0.9 seconds. The `endTime` property is then printed to the console.

```js
let video = document.querySelector("video");
let track = video.addTextTrack("captions", "Captions", "en");
track.mode = "showing";

let cue = new VTTCue(0.1, 0.9, "Hildy!");
console.log(cue.endTime); // 0.9
track.addCue(cue);
```

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"TextTrackCue: endTime property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue/endTime

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·