Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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

git-svn-id: http://svn.whatwg.org/webapps@7500 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
commit a66eb4f72165eb6101f9c7f09f3deccfa6133c18 1 parent b7a8a75
ianh authored

Showing 1 changed file with 85 additions and 7 deletions. Show diff stats Hide diff stats

  1. +85 7 source
92 source
@@ -39018,7 +39018,7 @@ The General Relativistic Field Equations</pre>
39018 39018
39019 39019 </div>
39020 39020
39021   -<!--END w3c-html--><!--END complete-->
  39021 +<!--END complete-->
39022 39022 <div data-component="other Hixie drafts (editor: Ian Hickson)">
39023 39023 <h5>WebVTT</h5>
39024 39024 <!--FIXUP dev-html +4-->
@@ -39039,8 +39039,6 @@ The General Relativistic Field Equations</pre>
39039 39039 DEFAULTS
39040 39040 line:-1 align:middle size:50%
39041 39041
39042   - Comments. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=14552
39043   -
39044 39042 -->
39045 39043
39046 39044
@@ -39164,6 +39162,61 @@ The Organisation for Sample Public Service Announcements accepts no liability fo
39164 39162
39165 39163 </div>
39166 39164
  39165 +
  39166 + <h3>Comments</h3>
  39167 +
  39168 + <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
  39169 +
  39170 + <p>Comments can be included in WebVTT files.</p>
  39171 +
  39172 + <p>Comments are just blocks that start with the word "<code title="">NOTE</code>" or "<code
  39173 + title="">NOTES</code>" (followed by a space or newline). A comment ends at the first blank
  39174 + line.</p>
  39175 +
  39176 + <div class="example">
  39177 +
  39178 + <p>Here, a one-line comment is used to note a possible problem with a cue.</p>
  39179 +
  39180 + <pre>WEBVTT
  39181 +
  39182 +00:01.000 --> 00:04.000
  39183 +Never drink liquid nitrogen.
  39184 +
  39185 +NOTE I'm not sure the timing is write on the following cue.
  39186 +
  39187 +00:05.000 --> 00:09.000
  39188 +&mdash; It will perforate your stomach.
  39189 +&mdash; You could die.</pre>
  39190 +
  39191 + </div>
  39192 +
  39193 + <div class="example">
  39194 +
  39195 + <p>In this example, the author has written many comments.</p>
  39196 +
  39197 + <pre>WEBVTT
  39198 +
  39199 +NOTES
  39200 +This file was written by Jill. I hope
  39201 +you enjoy reading it. Some things to
  39202 +bear in mind:
  39203 +- I was lip-reading, so the cues may
  39204 +not be 100% accurate
  39205 +- I didn't pay too close attention to
  39206 +when the cues should start or end.
  39207 +
  39208 +00:01.000 --> 00:04.000
  39209 +Never drink liquid nitrogen.
  39210 +
  39211 +NOTES check next cue
  39212 +
  39213 +00:05.000 --> 00:09.000
  39214 +&mdash; It will perforate your stomach.
  39215 +&mdash; You could die.
  39216 +
  39217 +NOTES end of file</pre>
  39218 +
  39219 + </div>
39167 39220
39168 39221
39169 39222
@@ -39253,9 +39306,9 @@ The Organisation for Sample Public Service Announcements accepts no liability fo
39253 39306 line, the second one to terminate the header block: in the future,
39254 39307 we can add a metadata block before the first blank line -->
39255 39308
39256   - <li>Zero or more <span title="WebVTT cue">WebVTT cues</span>
39257   - separated from each other by two or more <span title="WebVTT line
39258   - terminator">WebVTT line terminators</span>.</li>
  39309 + <li>Zero or more <span title="WebVTT cue">WebVTT cues</span> and/or <span title="WebVTT
  39310 + comments">WebVTT comments</span> separated from each other by two or more <span title="WebVTT
  39311 + line terminator">WebVTT line terminators</span>.</li>
39259 39312
39260 39313 <li>Zero or more <span title="WebVTT line terminator">WebVTT line
39261 39314 terminators</span>.</li>
@@ -39270,7 +39323,7 @@ The Organisation for Sample Public Service Announcements accepts no liability fo
39270 39323 <li><span>WebVTT cue timings</span>.</li>
39271 39324 <li>Optionally, one or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters followed by <span>WebVTT cue settings</span>.</li>
39272 39325 <li>A <span>WebVTT line terminator</span>.</li>
39273   - <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>
  39326 + <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>
39274 39327 </ol>
39275 39328
39276 39329 <p class="note">A <span>WebVTT cue</span> corresponds to one piece
@@ -39299,6 +39352,31 @@ The Organisation for Sample Public Service Announcements accepts no liability fo
39299 39352 is a <span>WebVTT file using chapter title text</span> is also a
39300 39353 <span>WebVTT file using cue text</span>.</p>
39301 39354
  39355 +
  39356 + <p>A <dfn>WebVTT comment</dfn> consists of the following components, in
  39357 + the given order:</p>
  39358 +
  39359 + <ol>
  39360 + <li>The string "<code title="">NOTE</code>".</li>
  39361 + <li>Optionally, a U+0053 LATIN CAPITAL LETTER S character.</li>
  39362 + <li>Optionally, the following components, in the given order:
  39363 + <ol>
  39364 + <li>Either:
  39365 + <ul>
  39366 + <li>A U+0020 SPACE character or U+0009 CHARACTER TABULATION (tab) character.</li>
  39367 + <li>A <span>WebVTT line terminator</span>.</li>
  39368 + </ul>
  39369 + <li>Any sequence of zero or more characters other than U+000A LINE FEED (LF) characters and
  39370 + U+000D CARRIAGE RETURN (CR) characters, each optionally separated from the next by a
  39371 + <span>WebVTT line terminator</span>, except that the entire resulting string must not contain
  39372 + the substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).
  39373 + </ol>
  39374 + </li>
  39375 + </ol>
  39376 +
  39377 + <p class="note">A <span>WebVTT comment</span> is ignored by the parser.</p>
  39378 +
  39379 +
39302 39380 <p>A <dfn>WebVTT line terminator</dfn> consists of one of the
39303 39381 following:</p>
39304 39382

0 comments on commit a66eb4f

Please sign in to comment.
Something went wrong with that request. Please try again.