[html5] r7500 - [ac] (3) Define a syntax for comments in WebVTT (doesn't affect parsers) Fixing [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Nov 1 16:27:11 PDT 2012


Author: ianh
Date: 2012-11-01 16:27:11 -0700 (Thu, 01 Nov 2012)
New Revision: 7500

Modified:
   source
Log:
[ac] (3) Define a syntax for comments in WebVTT (doesn't affect parsers)
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=14552
Affected topics: Video Text Tracks

Modified: source
===================================================================
--- source	2012-11-01 23:08:51 UTC (rev 7499)
+++ source	2012-11-01 23:27:11 UTC (rev 7500)
@@ -39018,7 +39018,7 @@
 
   </div>
 
-<!--END w3c-html--><!--END complete-->
+<!--END complete-->
 <div data-component="other Hixie drafts (editor: Ian Hickson)">
   <h5>WebVTT</h5>
 <!--FIXUP dev-html +4-->
@@ -39039,8 +39039,6 @@
             DEFAULTS
             line:-1 align:middle size:50%
 
-         Comments. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=14552
-
   -->
 
 
@@ -39164,6 +39162,61 @@
 
   </div>
 
+
+  <h3>Comments</h3>
+
+  <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
+
+  <p>Comments can be included in WebVTT files.</p>
+
+  <p>Comments are just blocks that start with the word "<code title="">NOTE</code>" or "<code
+  title="">NOTES</code>" (followed by a space or newline). A comment ends at the first blank
+  line.</p>
+
+  <div class="example">
+
+   <p>Here, a one-line comment is used to note a possible problem with a cue.</p>
+
+   <pre>WEBVTT
+
+00:01.000 --> 00:04.000
+Never drink liquid nitrogen.
+
+NOTE I'm not sure the timing is write on the following cue.
+
+00:05.000 --> 00:09.000
+— It will perforate your stomach.
+— You could die.</pre>
+
+  </div>
+
+  <div class="example">
+
+   <p>In this example, the author has written many comments.</p>
+
+   <pre>WEBVTT
+
+NOTES
+This file was written by Jill. I hope
+you enjoy reading it. Some things to
+bear in mind:
+- I was lip-reading, so the cues may
+not be 100% accurate
+- I didn't pay too close attention to
+when the cues should start or end.
+
+00:01.000 --> 00:04.000
+Never drink liquid nitrogen.
+
+NOTES check next cue
+
+00:05.000 --> 00:09.000
+— It will perforate your stomach.
+— You could die.
+
+NOTES end of file</pre>
+
+  </div>
   
 
 
@@ -39253,9 +39306,9 @@
    line, the second one to terminate the header block: in the future,
    we can add a metadata block before the first blank line -->
 
-   <li>Zero or more <span title="WebVTT cue">WebVTT cues</span>
-   separated from each other by two or more <span title="WebVTT line
-   terminator">WebVTT line terminators</span>.</li>
+   <li>Zero or more <span title="WebVTT cue">WebVTT cues</span> and/or <span title="WebVTT
+   comments">WebVTT comments</span> separated from each other by two or more <span title="WebVTT
+   line terminator">WebVTT line terminators</span>.</li>
 
    <li>Zero or more <span title="WebVTT line terminator">WebVTT line
    terminators</span>.</li>
@@ -39270,7 +39323,7 @@
    <li><span>WebVTT cue timings</span>.</li>
    <li>Optionally, one or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters followed by <span>WebVTT cue settings</span>.</li>
    <li>A <span>WebVTT line terminator</span>.</li>
-   <li>The <dfn>cue payload</dfn>: either <span>WebVTT cue text</span>, <span>WebVTT chapter title text</span>, or <span>WebVTT metadata text</span>, but it must not contain the substring "-->" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</li>
+   <li>The <dfn>cue payload</dfn>: either <span>WebVTT cue text</span>, <span>WebVTT chapter title text</span>, or <span>WebVTT metadata text</span>, but it must not contain the substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</li>
   </ol>
 
   <p class="note">A <span>WebVTT cue</span> corresponds to one piece
@@ -39299,6 +39352,31 @@
   is a <span>WebVTT file using chapter title text</span> is also a
   <span>WebVTT file using cue text</span>.</p>
 
+
+  <p>A <dfn>WebVTT comment</dfn> consists of the  following components, in
+  the given order:</p>
+
+  <ol>
+   <li>The string "<code title="">NOTE</code>".</li>
+   <li>Optionally, a U+0053 LATIN CAPITAL LETTER S character.</li>
+   <li>Optionally, the  following components, in the given order:
+    <ol>
+     <li>Either:
+      <ul>
+       <li>A U+0020 SPACE character or U+0009 CHARACTER TABULATION (tab) character.</li>
+       <li>A <span>WebVTT line terminator</span>.</li>
+      </ul>
+     <li>Any sequence of zero or more characters other than U+000A LINE FEED (LF) characters and
+     U+000D CARRIAGE RETURN (CR) characters, each optionally separated from the next by a
+     <span>WebVTT line terminator</span>, except that the entire resulting string must not contain
+     the substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).
+    </ol>
+   </li>
+  </ol>
+
+  <p class="note">A <span>WebVTT comment</span> is ignored by the parser.</p>
+
+
   <p>A <dfn>WebVTT line terminator</dfn> consists of one of the
   following:</p>
 




More information about the Commit-Watchers mailing list