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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
regions, lines
<link rel="help" href="https://w3c.github.io/webvtt/#collect-webvtt-region-settings">
assert_equals(cues.length, 13);
var regions = Array.from(cues).map(function(cue) {
return cue.region;
});
var valid_lines = [
0,
1,
100,
101,
65536,
4294967296,
18446744073709552000,
10000000000000000000000000000000000,
2,
];
valid_lines.forEach(function(valid, index) {
assert_equals(regions[index].lines, valid, 'Failed with region ' + index);
});
for (var i = 0; i < 4; i++) {
var index = valid_lines.length + i;
assert_equals(regions[index].lines, 3, 'Failed with region ' + index);
}
===
WEBVTT
NOTE valid
REGION
id:1
lines:0
REGION
id:2
lines:1
REGION
id:3
lines:100
REGION
id:4
lines:101
REGION
id:5
lines:65536
REGION
id:6
lines:4294967296
REGION
id:7
lines:18446744073709552000
REGION
id:8
lines:10000000000000000000000000000000000
REGION
id:9
lines:1 lines:3
lines:2
NOTE invalid
REGION
id:10
lines:-0
REGION
id:11
lines:1.5
REGION
id:12
lines:-1
REGION
id:13
lines: 1
lines :1
00:00:00.000 --> 00:00:01.000 region:1
text
00:00:00.000 --> 00:00:01.000 region:2
text
00:00:00.000 --> 00:00:01.000 region:3
text
00:00:00.000 --> 00:00:01.000 region:4
text
00:00:00.000 --> 00:00:01.000 region:5
text
00:00:00.000 --> 00:00:01.000 region:6
text
00:00:00.000 --> 00:00:01.000 region:7
text
00:00:00.000 --> 00:00:01.000 region:8
text
00:00:00.000 --> 00:00:01.000 region:9
text
00:00:00.000 --> 00:00:01.000 region:10
text
00:00:00.000 --> 00:00:01.000 region:11
text
00:00:00.000 --> 00:00:01.000 region:12
text
00:00:00.000 --> 00:00:01.000 region:13
text
|