Short URL: http://html5.org/r/5080
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 5080 | 2010-05-05 21:17 |
Index: source
===================================================================
--- source (revision 5079)
+++ source (revision 5080)
@@ -28285,6 +28285,12 @@
<p class="XXX">...
+ <!-- XXX
+ Make sure that .cues and .activeCues doesn't change while script is
+ running, except for addCue/removeCue and the removal of all cues in
+ the face of a dynamic track.src change.
+ -->
+
</div>
@@ -28379,16 +28385,22 @@
<h6>Parsing</h6>
- <p>A <dfn>WebSRT parser</dfn>, given an input byte stream, must
- convert the bytes into Unicode characters by interpreting them as
- UTF-8. Bytes or sequences of bytes that are not valid UTF-8
- sequences must be interpreted as a U+FFFD REPLACEMENT CHARACTER. All
- U+0000 NULL characters must be replaced by U+FFFD REPLACEMENT
- CHARACTERs.</p>
+ <p>A <dfn>WebSRT parser</dfn>, given an input byte stream and a
+ <span>timed track list of cues</span> <var title="">output</var>,
+ must convert the bytes into a string of Unicode characters by
+ interpreting them as UTF-8, and then must parse the resulting string
+ according to the <span>WebSRT parser algorithm</span> below. A
+ <span>WebSRT parser</span>, specifically its conversion and parsing
+ steps, is typically run asynchronously, with the input byte stream
+ being updated incrementally as the resource is downloaded.</p>
- <p>The Unicode characters from a string that must be parsed
- according to the following algorithm:</p>
+ <p>When convering the bytes into Unicode characters, bytes or
+ sequences of bytes that are not valid UTF-8 sequences must be
+ interpreted as a U+FFFD REPLACEMENT CHARACTER, and all U+0000 NULL
+ characters must be replaced by U+FFFD REPLACEMENT CHARACTERs.</p>
+ <p>The <dfn>WebSRT parser algorithm</dfn> is as follows:</p>
+
<ol>
<li><p>Let <var title="">input</var> be the string being
@@ -28398,6 +28410,19 @@
title="">input</var>, initially pointing at the start of the
string.</p></li>
+ <li><p><span>Collect a sequence of characters</span> that are
+ either U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
+ characters.</p></li>
+
+ <li><p><span>Collect a sequence of characters</span> that are
+ <em>not</em> U+000D CARRIAGE RETURN (CR) or 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> is the empty string, then the
+ file has ended. Abort these steps. The <span>WebSRT parser</span>
+ has finished.</p></li>
+
<li><p class="XXX">...</p></li>
</ol>