-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
44 lines (40 loc) · 818 Bytes
/
Copy pathtypes.ts
File metadata and controls
44 lines (40 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
export interface Word {
id: string;
text: string;
start?: number; // milliseconds
end?: number; // milliseconds
}
export interface Cue {
id: string;
start: number; // milliseconds
end: number; // milliseconds
text: string;
words?: Word[]; // For Enhanced LRC / Word-level VTT
}
export enum SubtitleFormat {
LRC = 'lrc',
LRC_ENHANCED = 'lrc_enhanced',
SRT = 'srt',
VTT = 'vtt',
VTT_KARAOKE = 'vtt_karaoke',
TTML = 'ttml',
TTML_KARAOKE = 'ttml_karaoke',
SRV1 = 'srv1',
SRV2 = 'srv2',
SRV3 = 'srv3',
SRV3_KARAOKE = 'srv3_karaoke',
TXT = 'txt',
JSON = 'json',
JSON3 = 'json3'
}
export interface FileData {
name: string;
format: SubtitleFormat;
content: string;
}
export interface Metadata {
title?: string;
artist?: string;
album?: string;
by?: string;
}