|
|
|
|
|
title="">input</var>.</p></li> |
|
|
|
|
|
|
|
|
<li>Let <var title="">line</var> be a string variable. Unset the |
|
|
<var title="">already collected line</var> flag.</li> |
|
|
|
|
|
|
|
|
<li><p><span>Collect a sequence of characters</span> that are |
|
|
<em>not</em> U+000A LINE FEED (LF) characters. Let <var |
|
|
title="">line</var> be those characters, if any.</p></li> |
|
|
|
|
title="">position</var> to the next character in <var |
|
|
title="">input</var>.</p></li> |
|
|
|
|
|
<li><p>If <var title="">line</var> contains the three-character |
|
|
substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D |
|
|
HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var |
|
|
title="">already collected line</var> flag and jump to the step |
|
|
labeled <i>cue loop</i>.</p></li> |
|
|
|
|
|
<!-- In v2, this is where we can put header metadata processing --> |
|
|
|
|
|
<li><p>If <var title="">line</var> is not the empty string, then |
|
|
jump back to the step labeled <i title="">header</i>.</p></li> |
|
|
|
|
|
|
|
|
<li><p><i>Cue loop</i>: <span>Collect a sequence of |
|
|
characters</span> that are U+000A LINE FEED (LF) |
|
|
characters.</p></li> |
|
|
<li><p><i>Cue loop</i>: If the <var title="">already collected |
|
|
line</var> flag is set, then jump to the step labeled <var |
|
|
title="">cue creation</var>.</p></li> |
|
|
|
|
|
<li><p><span>Collect a sequence of characters</span> that are |
|
|
U+000A LINE FEED (LF) characters.</p></li> |
|
|
|
|
|
<li><p><span>Collect a sequence of characters</span> that are |
|
|
<em>not</em> U+000A LINE FEED (LF) characters. Let <var |
|
|
|
|
a newline, so we have none of that either, meaning we have nothing. |
|
|
-->.)</p></li> |
|
|
|
|
|
<li><p>Let <var title="">cue</var> be a new <span>text track |
|
|
cue</span> associated with <var title="">output</var>'s <span>text |
|
|
track</span>.</p></li> |
|
|
<li><p><i>Cue creation</i>: Let <var title="">cue</var> be a new |
|
|
<span>text track cue</span> associated with <var |
|
|
title="">output</var>'s <span>text track</span>.</p></li> |
|
|
|
|
|
<li><p>Let <var title="">cue</var>'s <span>text track cue |
|
|
identifier</span> be the empty string.</p></li> |
|
|
|
|
discard <var title="">cue</var> and jump to the step labeled <i>cue |
|
|
loop</i>.</p></li> |
|
|
|
|
|
<li><p><i>Timings</i>: <span>Collect WebVTT cue timings and |
|
|
settings</span> from <var title="">line</var>, using <var |
|
|
title="">cue</var> for the results. If that fails, jump to the step |
|
|
labeled <i>bad cue</i>.</p></li> |
|
|
<li><p><i>Timings</i>: Unset the <var title="">already collected |
|
|
line</var> flag.</p></li> |
|
|
|
|
|
<li><p><span>Collect WebVTT cue timings and settings</span> from |
|
|
<var title="">line</var>, using <var title="">cue</var> for the |
|
|
results. If that fails, jump to the step labeled <i>bad |
|
|
cue</i>.</p></li> |
|
|
|
|
|
<li><p>Let <var title="">cue text</var> be the empty |
|
|
string.</p></li> |
|
|
|
|
<li><p>If <var title="">line</var> is the empty string, then jump |
|
|
to the step labeled <i>cue text processing</i>.</p></li> |
|
|
|
|
|
<li><p>If <var title="">line</var> contains the three-character |
|
|
substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D |
|
|
HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var |
|
|
title="">already collected line</var> flag and jump to the step |
|
|
labeled <i>cue text processing</i>.</p></li> |
|
|
|
|
|
<li><p>If <var title="">cue text</var> is not empty, append a |
|
|
U+000A LINE FEED (LF) character to <var title="">cue |
|
|
text</var>.</p></li> |
|
|
|
|
<em>not</em> U+000A LINE FEED (LF) characters. Let <var |
|
|
title="">line</var> be those characters, if any.</p></li> |
|
|
|
|
|
<li><p>If <var title="">line</var> contains the three-character |
|
|
substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D |
|
|
HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var |
|
|
title="">already collected line</var> flag and jump to the step |
|
|
labeled <i>cue loop</i>.</p></li> |
|
|
|
|
|
<li><p>If <var title="">line</var> is the empty string, then jump |
|
|
to the step labeled <i>cue loop</i>.</p></li> |
|
|
|