Constructors
constructor
- new Subtitles(options?: SubtitlesOptions): Subtitles
Parameters
Optional
options: SubtitlesOptions
Methods
addTextBlock
- addTextBlock(textBlock: TextBlock, index?: number): void
Returns void
fitDurationToBlocks
- fitDurationToBlocks(): void
Returns void
getDuration
- getDuration(): number
Returns number
getId
- getId(): string
Returns string
getLanguage
- getLanguage(): string
Returns string
removeTextBlock
- removeTextBlock(index: number): void
Returns void
serialize
- serialize(): {
duration: number;
id: string;
language: string;
textBlocks: { duration: number; text: string; time: number }[];
} Returns {
duration: number;
id: string;
language: string;
textBlocks: { duration: number; text: string; time: number }[];
}
setLanguage
- setLanguage(language: string): void
Returns void
setTextBlocks
- setTextBlocks(textBlocks: TextBlock[]): void
Returns void
updateSubtitlesClips
- updateSubtitlesClips(): void
Returns void
updateTextBlock
- updateTextBlock(index: number, textBlock: Partial<TextBlock>): void
Returns void
validateTextBlocks
- validateTextBlocks(): void
Returns void