Skip to main content

Caption

Caption defines one subtitle segment on the video timeline.

interface Caption {
start: number;
end: number;
text: string;
words: Word[];
}
PropertyRequiredNotes
startYesCaption start time in seconds.
endYesCaption end time in seconds.
textYesFull caption text.
wordsYesWord-level timings for the caption.

Example

{
"start": 0.5,
"end": 2,
"text": "Welcome to our video",
"words": [
{ "start": 0.5, "end": 0.9, "text": "Welcome" },
{ "start": 0.9, "end": 1.1, "text": "to" },
{ "start": 1.1, "end": 1.4, "text": "our" },
{ "start": 1.4, "end": 2, "text": "video" }
]
}

Used By