CVS html5/webvtt

Update of /sources/public/html5/webvtt
In directory roscoe:/tmp/cvs-serv31315

Modified Files:
	Overview.html 
Log Message:
Include region specification

--- /sources/public/html5/webvtt/Overview.html	2013/05/13 10:34:59	1.65
+++ /sources/public/html5/webvtt/Overview.html	2013/07/06 02:23:06	1.66
@@ -4,11 +4,11 @@
     <meta charset="ascii">
     <title>WebVTT: The Web Video Text Tracks Format</title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-    <!-- local copy: -->
-    
-    <!-- remote copy: 
-    <script src='https://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script>
+    <!-- local copy:
+    <script src='../../respec/js/require.js' data-main='../../respec/js/profile-w3c-common' async class='remove'></script>
     -->
+    <!-- remote copy: -->
+    
     
     <!-- script to register bugs -->
     <script src="http://dvcs.w3.org/hg/webcomponents/raw-file/tip/assets/scripts/bug-assist.js"></script>
@@ -151,12 +151,6 @@
     color:  #ff4500;
 }
 
-
-/* --- --- */
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
 /* --- TOC --- */
 .toc a, .tof a {
     text-decoration:    none;
@@ -259,7 +253,7 @@
 }
 
 
-</style><link rel="stylesheet" href="http://www.w3.org/community/src/css/spec/cg-draft.css"></head>
+</style><link rel="stylesheet" href="https://www.w3.org/community/src/css/spec/cg-draft.css"></head>
   <!-- v2 feature requests:
 
          Explicitly allow random comments on the line after the
@@ -276,13 +270,13 @@
             line:-1 align:middle size:50%
 
   -->
-  <body><div class="head">
+  <body class="h-entry"><div class="head">
   <p>
     <a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a>
   </p>
   <h1 class="title" id="title">WebVTT: The Web Video Text Tracks Format</h1>
   
-  <h2 id="draft-community-group-specification-13-may-2013">Draft Community Group Specification 13 May 2013</h2>
+  <h2 id="draft-community-group-specification-06-july-2013">Draft Community Group Specification <time class="dt-published" datetime="2013-07-06">06 July 2013</time></h2>
   <dl>
     
     
@@ -297,8 +291,8 @@
       
     
     <dt>Editors:</dt>
-    <dd><a href="mailto:silviapfeiffer1@gmail.com">Silvia Pfeiffer</a>, <a href="http://nicta.com.au/">NICTA</a></dd>
-<dd><a href="mailto:ian@hixie.ch">Ian Hickson</a>, <a href="http://google.com/">Google</a> (previous editor)</dd>
+    <dd class="p-author h-card vcard"><a class="u-url url p-name fn" href="mailto:silviapfeiffer1@gmail.com">Silvia Pfeiffer</a></dd>
+<dd class="p-author h-card vcard"><a class="u-url url p-name fn" href="mailto:ian@hixie.ch">Ian Hickson</a>, <a class="p-org org h-org h-card" href="http://google.com/">Google</a> (previous editor)</dd>
 
     
   </dl>
@@ -340,7 +334,7 @@
     <p>This specification was originally created by the WHATWG as a Living Standard and last published at <a href="http://dev.w3.org/html5/webvtt/">http://dev.w3.org/html5/webvtt/</a>.
     </p>
   
-</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#cues-with-multiple-lines" class="tocxref"><span class="secno">1.1 </span>Cues with multiple lines</a></li><li class="tocline"><a href="#comments" class="tocxref"><span class="secno">1.2 </span>Comments</a></li><li class="tocline"><a href="#other-features" class="tocxref"><span class="secno">1.3 </span>Other features</a></li></ul></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">2. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#dependencies" class="tocxref"><span class="secno">2.1 </span>Dependencies</a></li></ul></li><li class="tocline"><a href="#data-model" class="tocxref"><span class="secno">3. </span>Data model</a></li><li class="tocline"><a href="#the-webvtt-file-format" class="tocxref"><span class="secno">4. /span>The WebVTT file format</a><ul class="toc"><li class="tocline"><a href="#syntax" class="tocxref"><span class="secno">4.1 </span>Syntax</a></li><li class="tocline"><a href="#parsing" class="tocxref"><span class="secno">4.2 </span>Parsing</a></li><li class="tocline"><a href="#webvtt-cue-text-parsing-rules" class="tocxref"><span class="secno">4.3 </span><span>WebVTT cue text parsing rules</span></a></li><li class="tocline"><a href="#webvtt-cue-text-dom-construction-rules" class="tocxref"><span class="secno">4.4 </span><span>WebVTT cue text DOM construction rules</span></a></li></ul></li><li class="tocline"><a href="#rendering" class="tocxref"><span class="secno">5. </span>Rendering</a><ul class="toc"><li class="tocline"><a href="#cues-in-isolation" class="tocxref"><span class="secno">5.1 </span>Cues in isolation</a></li><li class="tocline"><a href="#cues-with-video" class="tocxref"><span class="secno">5.2 </span>Cues with video</a><ul class="toc"><li class="tocline"><a href="#processing-model" class="tocxef"><span class="secno">5.2.1 </span>Processing model</a></li><li class="tocline"><a href="#applying-css-properties-to-webvtt-node-objects" class="tocxref"><span class="secno">5.2.2 </span>Applying CSS properties to <span title="WebVTT Node Object" class="formerLink">WebVTT Node Objects</span></a></li><li class="tocline"><a href="#css-extensions" class="tocxref"><span class="secno">5.2.3 </span>CSS extensions</a><ul class="toc"><li class="tocline"><a href="#the-cue-pseudo-element" class="tocxref"><span class="secno">5.2.3.1 </span>The '::cue' pseudo-element</a></li><li class="tocline"><a href="#the-past-and-future-pseudo-classes" class="tocxref"><span class="secno">5.2.3.2 </span>The ':past' and ':future' pseudo-classes</a></li></ul></li></ul></li></ul></li><li class="tocline"><a href="#webvtt-api" class="tocxref"><span class="secno">6. </span>WebVTT API</a></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">7. </span>IANA considerations</a><ul class="toc"><li class="ocline"><a href="#text-vtt" class="tocxref"><span class="secno">7.1 </span><span><code>text/vtt</code></span></a></li></ul></li><li class="tocline"><a href="#references-1" class="tocxref"><span class="secno">8. </span>References</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">9. </span>Acknowledgements</a></li></ul></section>
+</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#cues-with-multiple-lines" class="tocxref"><span class="secno">1.1 </span>Cues with multiple lines</a></li><li class="tocline"><a href="#comments" class="tocxref"><span class="secno">1.2 </span>Comments</a></li><li class="tocline"><a href="#other-features" class="tocxref"><span class="secno">1.3 </span>Other features</a></li></ul></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">2. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#dependencies" class="tocxref"><span class="secno">2.1 </span>Dependencies</a></li></ul></li><li class="tocline"><a href="#data-model" class="tocxref"><span class="secno">3. </span>Data model</a><ul class="toc"><li class="tocline"><a href="#text-track-cues" class="tocxref"><span class="secno"3.1 </span>Text Track Cues</a></li><li class="tocline"><a href="#text-track-region" class="tocxref"><span class="secno">3.2 </span>Text Track Region</a></li></ul></li><li class="tocline"><a href="#the-webvtt-file-format-syntax" class="tocxref"><span class="secno">4. </span>The WebVTT file format: Syntax</a><ul class="toc"><li class="tocline"><a href="#webvtt-file-structure" class="tocxref"><span class="secno">4.1 </span>WebVTT file structure</a></li><li class="tocline"><a href="#webvtt-comments" class="tocxref"><span class="secno">4.2 </span>WebVTT comments</a></li><li class="tocline"><a href="#types-of-webvtt-cue-payload" class="tocxref"><span class="secno">4.3 </span>Types of WebVTT cue payload</a><ul class="toc"><li class="tocline"><a href="#webvtt-metadata-text" class="tocxref"><span class="secno">4.3.1 </span>WebVTT metadata text</a></li><li class="tocline"><a href="#webvtt-cue-text" class="tocxref"><span class="secno">4.3.2 </span>WebVTT cue text</a></li></ul></li><li class="tocline"><a href="#webvtt-ue-settings" class="tocxref"><span class="secno">4.4 </span>WebVTT cue settings</a><ul class="toc"><li class="tocline"><a href="#webvtt-region-definition" class="tocxref"><span class="secno">4.4.1 </span>WebVTT region definition</a></li><li class="tocline"><a href="#webvtt-cue-settings-1" class="tocxref"><span class="secno">4.4.2 </span>WebVTT cue settings</a></li></ul></li><li class="tocline"><a href="#properties-of-cue-sequences" class="tocxref"><span class="secno">4.5 </span>Properties of cue sequences</a><ul class="toc"><li class="tocline"><a href="#webvtt-file-using-only-nested-cues" class="tocxref"><span class="secno">4.5.1 </span>WebVTT file using only nested cues</a></li></ul></li><li class="tocline"><a href="#types-of-webvtt-files" class="tocxref"><span class="secno">4.6 </span>Types of WebVTT files</a><ul class="toc"><li class="tocline"><a href="#webvtt-file-using-metadata-content" class="tocxref"><span class="secno">4.6.1 </span>WebVTT file using metadata content</a></li><li class="tocline"><a hrf="#webvtt-file-using-chapter-title-text" class="tocxref"><span class="secno">4.6.2 </span>WebVTT file using chapter title text</a></li><li class="tocline"><a href="#webvtt-file-using-cue-text" class="tocxref"><span class="secno">4.6.3 </span>WebVTT file using cue text</a></li></ul></li></ul></li><li class="tocline"><a href="#webvtt-file-format-parsing" class="tocxref"><span class="secno">5. </span>WebVTT file format: Parsing</a><ul class="toc"><li class="tocline"><a href="#webvtt-file-parsing" class="tocxref"><span class="secno">5.1 </span>WebVTT file parsing</a></li><li class="tocline"><a href="#webvtt-region-settings-parsing" class="tocxref"><span class="secno">5.2 </span>WebVTT region settings parsing</a></li><li class="tocline"><a href="#webvtt-cue-timings-and-settings-parsing" class="tocxref"><span class="secno">5.3 </span>WebVTT cue timings and settings parsing</a></li><li class="tocline"><a href="#webvtt-cue-text-parsing-rules" class="tocxref"><span class="secno">5.4 </span><span>WebVTT cue text paring rules</span></a></li><li class="tocline"><a href="#webvtt-cue-text-dom-construction-rules" class="tocxref"><span class="secno">5.5 </span><span>WebVTT cue text DOM construction rules</span></a></li></ul></li><li class="tocline"><a href="#rendering" class="tocxref"><span class="secno">6. </span>Rendering</a><ul class="toc"><li class="tocline"><a href="#cues-in-isolation" class="tocxref"><span class="secno">6.1 </span>Cues in isolation</a></li><li class="tocline"><a href="#cues-with-video" class="tocxref"><span class="secno">6.2 </span>Cues with video</a><ul class="toc"><li class="tocline"><a href="#processing-model" class="tocxref"><span class="secno">6.2.1 </span>Processing model</a></li><li class="tocline"><a href="#applying-css-properties-to-webvtt-node-objects" class="tocxref"><span class="secno">6.2.2 </span>Applying CSS properties to <span title="WebVTT Node Object" class="formerLink">WebVTT Node Objects</span></a></li><li class="tocline"><a href="#css-extensions" class="tocxref"><span class="secno>6.2.3 </span>CSS extensions</a><ul class="toc"><li class="tocline"><a href="#the-cue-pseudo-element" class="tocxref"><span class="secno">6.2.3.1 </span>The '::cue' pseudo-element</a></li><li class="tocline"><a href="#the-past-and-future-pseudo-classes" class="tocxref"><span class="secno">6.2.3.2 </span>The ':past' and ':future' pseudo-classes</a></li><li class="tocline"><a href="#the-cue-region-pseudo-element" class="tocxref"><span class="secno">6.2.3.3 </span>The '::cue-region' pseudo-element</a></li></ul></li></ul></li></ul></li><li class="tocline"><a href="#webvtt-api-for-browsers" class="tocxref"><span class="secno">7. </span>WebVTT API for Browsers</a><ul class="toc"><li class="tocline"><a href="#webvttcue-interface" class="tocxref"><span class="secno">7.1 </span>WebVTTCue interface</a></li><li class="tocline"><a href="#extension-of-the-texttrack-interface-for-region-support" class="tocxref"><span class="secno">7.2 </span>Extension of the TextTrack interface for region support</a></li><li class="toclie"><a href="#extension-of-the-texttrackcue-interface-for-region-support" class="tocxref"><span class="secno">7.3 </span>Extension of the TextTrackCue interface for region support</a></li><li class="tocline"><a href="#texttrackregion-interface" class="tocxref"><span class="secno">7.4 </span>TextTrackRegion interface</a></li><li class="tocline"><a href="#texttrackregionlist-interface" class="tocxref"><span class="secno">7.5 </span>TextTrackRegionList interface</a></li></ul></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">8. </span>IANA considerations</a><ul class="toc"><li class="tocline"><a href="#text-vtt" class="tocxref"><span class="secno">8.1 </span><span><code>text/vtt</code></span></a></li></ul></li><li class="tocline"><a href="#references-1" class="tocxref"><span class="secno">9. </span>References</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">10. </span>Acknowledgements</a></li></ul></section>
 
   <section id="introduction">
   <!--OddPage--><h2><span class="secno">1. </span>Introduction</h2>
@@ -578,6 +572,37 @@
 ::cue(.loud) { font-size: 2em }</pre>
 
   </div>
+
+  <div class="example">
+  <p>This example shows two regions containing rollup captions for two different speakers. Fred's cues scroll up in a region in the left half of the video, Bill's cues scroll up in a region on the right half of the video. Fred's first cue disappears at 12.5sec  even through it is defined until 20sec because its region is limited to 3 lines and at 12.5sec a fourth cue appears:
+  </p>
+
+  <pre>WEBVTT
+Region: id=fred width=50% lines=3 regionanchor=0%,100% viewportanchor=10%,90% scroll=up
+Region: id=bill width=50% lines=3 regionanchor=100%,100% viewportanchor=90%,90% scroll=up
+
+00:00:00.000 --&gt; 00:00:20.000 region:fred align:left
+&lt;v Fred&gt;Hi, my name is Fred
+
+00:00:02.500 --&gt; 00:00:22.500 region:bill align:right
+&lt;v Bill&gt;Hi, I'm Bill
+
+00:00:05.000 --&gt; 00:00:25.000 region:fred align:left
+&lt;v Fred&gt;Would you like to get a coffee?
+
+00:00:07.500 --&gt; 00:00:27.500 region:bill align:right
+&lt;v Bill&gt;Sure! I've only had one today.
+
+00:00:10.000 --&gt; 00:00:30.000 region:fred align:left
+&lt;v Fred&gt;This is my fourth!
+
+00:00:12.500 --&gt; 00:00:32.500 region:fred align:left
+&lt;v Fred&gt;OK, let's go.</pre>
+
+  <p>Note that regions are only defined for horizontal cues.</p>
+
+  </div>
+
   </section>
 
   </section>
@@ -605,6 +630,8 @@
    </li><li><dfn id="dfn-alphanumeric-ascii-characters">Alphanumeric ASCII characters</dfn>
    </li><li><dfn id="dfn-space-character">Space character</dfn>
    </li><li><dfn id="dfn-skip-whitespace">Skip whitespace</dfn>
+   </li><li><dfn id="dfn-supported-property-indices">Supported property indices</dfn>
+   </li><li><dfn id="dfn-determine-the-value-of-an-indexed-property">Determine the value of an indexed property</dfn>
    </li><li><dfn id="dfn-split-a-string-on-spaces">Split a string on spaces</dfn>
    </li><li><dfn id="dfn-html-namespace">HTML namespace</dfn>
    </li><li><dfn id="dfn-media-element">Media element</dfn>
@@ -614,6 +641,7 @@
    </li><li><dfn id="dfn-text-track">Text track</dfn>
    </li><li><dfn id="dfn-text-track-kind">Text track kind</dfn>
    </li><li><dfn id="dfn-text-track-mode">Text track mode</dfn>
+   </li><li><dfn id="dfn-text-track-disabled">Text track disabled</dfn>
    </li><li><dfn id="dfn-text-track-showing">Text track showing</dfn>
    </li><li><dfn id="dfn-text-track-cue">Text track cue</dfn>
    </li><li><dfn id="dfn-text-track-list-of-cues">Text track list of cues</dfn>
@@ -628,12 +656,18 @@
    </li><li><dfn id="dfn-rules-for-updating-the-text-track-rendering">Rules for updating the text track rendering</dfn>
    </li><li><dfn id="dfn-rules-for-rendering-the-cue-in-isolation">Rules for rendering the cue in isolation</dfn>
    </li><li><dfn id="dfn-texttrackcue"><code>TextTrackCue</code></dfn> interface
+   </li><li><dfn id="dfn-texttrack"><code>TextTrack</code></dfn> interface
   </li></ul>
   </section>
   </section>
 
   <section id="data-model">
   <!--OddPage--><h2><span class="secno">3. </span>Data model</h2>
+  <!-- Add some content here about cues and serialisation format in general -->
+  <!-- Describe metadata, caption/subtitle, chapter & description cues -->
+
+  <section id="text-track-cues">
+  <h3><span class="secno">3.1 </span>Text Track Cues</h3>
 
   <p>WebVTT cues are HTML <a title="text track cue" href="#dfn-text-track-cue" class="internalDFN">text track cues</a> that additionally
   consist of the following: <a href="#refsHTML5">[HTML5]</a></p>
@@ -730,9 +764,7 @@
 
    <dt><dfn title="text track cue text position" id="dfn-text-track-cue-text-position">A text position</dfn>
    </dt><dd>
-    <p>A number giving the position of the text of the cue within each line, to be interpreted as a
-    percentage of the video, as defined by the <a title="text track cue writing
-    direction" href="#dfn-text-track-cue-writing-direction" class="internalDFN">writing direction</a>.</p>
+     <p>A number giving the position of the text of the cue within each line. If the cue is not within a region, to be interpreted as a percentage of the video, as defined by the <span title="text track cue writing direction">writing direction</span>, otherwise to be interpreted as a percentage of the region width.</p>
    </dd>
 
    <dt><dfn title="text track cue size" id="dfn-text-track-cue-size">A size</dfn>
@@ -771,6 +803,11 @@
 
    </dd>
 
+   <dt><dfn title="text track cue region identifier" id="dfn-text-track-cue-region-identifier">A region identifier</dfn></dt>
+   <dd>
+    <p>A string that references by identifier the region that a cue belongs to, if it is not null.</p>
+   </dd>
+
   </dl>
 
   <p>The associated <a href="#dfn-rules-for-updating-the-text-track-rendering" class="internalDFN">rules for updating the text track rendering</a> of WebVTT <a title="text track cue" href="#dfn-text-track-cue" class="internalDFN">text track cues</a> are the <a href="#dfn-rules-for-updating-the-display-of-webvtt-text-tracks" class="internalDFN">rules for updating the display of
@@ -782,20 +819,83 @@
   flag</a> is set has its <a title="text track cue writing direction" href="#dfn-text-track-cue-writing-direction" class="internalDFN">writing
   direction</a>, <a title="text track cue snap-to-lines flag" href="#dfn-text-track-cue-snap-to-lines-flag" class="internalDFN">snap-to-lines flag</a>, <a title="text track cue line position" href="#dfn-text-track-cue-line-position" class="internalDFN">line position</a>, <a title="text track cue text
   position" href="#dfn-text-track-cue-text-position" class="internalDFN">text position</a>, <a title="text track cue size" href="#dfn-text-track-cue-size" class="internalDFN">size</a>, <a title="text
-  track cue alignment" href="#dfn-text-track-cue-alignment" class="internalDFN">alignment</a>, or <a title="text track cue text" href="#dfn-text-track-cue-text" class="internalDFN">text</a> change
-  value, then the user agent must empty the <a href="#dfn-text-track-cue-display-state" class="internalDFN">text track cue display state</a>, and then
-  immediately run the <a href="#dfn-text-track" class="internalDFN">text track</a>'s <a href="#dfn-rules-for-updating-the-display-of-webvtt-text-tracks" class="internalDFN">rules for updating the display of WebVTT text
-  tracks</a>.</p>
+  track cue alignment" href="#dfn-text-track-cue-alignment" class="internalDFN">alignment</a>, <a title="text track region identifier" href="#dfn-text-track-region-identifier" class="internalDFN">region identifier</a>,
+  or <a title="text track cue text" href="#dfn-text-track-cue-text" class="internalDFN">text</a> change value, then the user agent must empty
+  the <a href="#dfn-text-track-cue-display-state" class="internalDFN">text track cue display state</a>, and then immediately run the <a href="#dfn-text-track" class="internalDFN">text track</a>'s
+  <a href="#dfn-rules-for-updating-the-display-of-webvtt-text-tracks" class="internalDFN">rules for updating the display of WebVTT text tracks</a>.</p>
 
   </div>
 
   </section>
 
-  <section id="the-webvtt-file-format">
-  <!--OddPage--><h2><span class="secno">4. </span>The WebVTT file format</h2>
+  <section id="text-track-region">
+  <h3><span class="secno">3.2 </span>Text Track Region</h3>
+  
+  <p>A <dfn title="text track region" id="dfn-text-track-region">text track region</dfn> represents a subpart of the video viewport and provides a rendering area for <a title="text track cue" href="#dfn-text-track-cue" class="internalDFN">text track cues</a>.</p>
+
+  <p>Each <a tile="text track region" href="#dfn-text-track-region" class="internalDFN">text track region</a> consists of:</p>
+
+  <dl>
+
+   <dt><dfn title="text track region identifier" id="dfn-text-track-region-identifier">An identifier</dfn></dt>
+   <dd>
+    <p>An arbitrary string.</p>
+   </dd>
+
+   <dt><dfn title="text track region width" id="dfn-text-track-region-width">A width</dfn></dt>
+   <dd>
+    <p>A number giving the width of the box within which the text of each line of the containing cues is to be rendered, to be interpreted as a percentage of the video width. Defaults to 100.</p>
+   </dd>
+
+   <dt><dfn title="text track region lines" id="dfn-text-track-region-lines">A lines value</dfn></dt>
+   <dd>
+    <p>A number giving the number of lines of the box within which the text of each line of the containing cues is to be rendered. Defaults to 3.</p>
+   </dd>
+
+   <dt><dfn title="text track region anchor" id="dfn-text-track-region-anchor">A region anchor point</dfn></dt>
+   <dd>
+    <p>Two numbers giving the x and y coordinates within the region which is anchored to the video viewport and does not change location even when the region does, e.g. because of font size changes. Defaults to (0,100), i.e. the bottom left corner of the region.</p>
+   </dd>
+
+   <dt><dfn title="text track region viewport anchor" id="dfn-text-track-region-viewport-anchor">A region viewport anchor point</dfn></dt>
+   <dd>
+    <p>Two numbers giving the x and y coordinates within the video viewport to which the region anchor point is anchored. Defaults to (0,100), i.e. the bottom left corner of the viewport.</p>
+   </dd>
+
+   <dt><dfn title="text track region scroll" id="dfn-text-track-region-scroll">A scroll value</dfn></dt>
+   <dd>
+    <p>One of the following:</p>
+    <dl>
+      <dt><dfn title="text track region scroll none" id="dfn-text-track-region-scroll-none">None</dfn></dt>
+      <dd>Indicates that the cues in the region are not to scroll and instead stay fixed at the location they were first painted in.</dd>
+
+      <dt><dfn title="text track region scroll up" id="dfn-text-track-region-scroll-up">Up</dfn></dt>
+      <dd>Indicates that the cues in the region will be added at the bottom of the region and push any already displayed cues in the region up until all lines of the new cue are visible in the region.</dd>
+      <!-- in the future we may introduce scroll="down"-->
+    </dl>
+   </dd>
+  </dl>
+
+  <p>For parsing, we also need the following:</p>
+
+  <dl>
+  <dt><dfn title="text track list of regions" id="dfn-text-track-list-of-regions">A text track list of regions</dfn>
+
+  </dt><dd>
+
+   <p>A list of zero or more <a title="text track region" href="#dfn-text-track-region" class="internalDFN">text track regions</a>.</p>
+
+  </dd>
+  </dl>
+  </section>
+
+  </section>
+
+  <section id="the-webvtt-file-format-syntax">
+  <!--OddPage--><h2><span class="secno">4. </span>The WebVTT file format: Syntax</h2>
 
-  <section id="syntax">
-  <h3><span class="secno">4.1 </span>Syntax</h3>
+  <section id="webvtt-file-structure">
+  <h3><span class="secno">4.1 </span>WebVTT file structure</h3>
 
   <p>A <dfn id="dfn-webvtt-file">WebVTT file</dfn> must consist of a <a href="#dfn-webvtt-file-body" class="internalDFN">WebVTT file
   body</a> encoded as UTF-8 and labeled with the <a href="#dfn-mime-type" class="internalDFN">MIME
@@ -815,13 +915,16 @@
    characters that are not U+000A LINE FEED (LF) or U+000D CARRIAGE
    RETURN (CR) characters.</li> <!-- allows for Emacs line -->
 
-   <li>Two or more <a title="WebVTT line terminator" href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line
-   terminators</a>.</li> <!-- the first one to terminate the magic
-   line, the second one to terminate the header block: in the future,
-   we can add a metadata block before the first blank line -->
+   <li>One or more <a title="WebVTT line terminator" href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminators</a> to
+   terminate the line with the file magic and separate it from the rest of the body.</li>
+
+   <li>Zero or more <a title="WebVTT metadata header" href="#dfn-webvtt-metadata-header" class="internalDFN">WebVTT metadata headers</a>.</li>
+
+   <li>One or more <a title="WebVTT line terminator" href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminators</a> to
+   terminate the header block and separate the cues from the file header.</li>
 
    <li>Zero or more <a title="WebVTT cue" href="#dfn-webvtt-cue" class="internalDFN">WebVTT cues</a> and <a title="WebVTT
-   comment" href="#dfn-webvtt-comment" class="internalDFN">WebVTT comments</a> separated from each other by two or more <a title="WebVTT
+   comment" href="#dfn-webvtt-comment" class="internalDFN">WebVTT comments</a> separated from each other by one or more <a title="WebVTT
    line terminator" href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminators</a>.</li>
 
    <li>Zero or more <a title="WebVTT line terminator" href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line
@@ -829,15 +932,44 @@
 
   </ol>
 
+  <p>A <dfn id="dfn-webvtt-line-terminator">WebVTT line terminator</dfn> consists of one of the
+  following:</p>
+
+  <ul class="brief">
+   <li>A U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.</li>
+   <li>A single U+000A LINE FEED (LF) character.</li>
+   <li>A single U+000D CARRIAGE RETURN (CR) character.</li>
+  </ul>
+
+  <p>A <dfn id="dfn-webvtt-metadata-header">WebVTT metadata header</dfn> consists of the following components, in
+  the given order:</p>
+
+  <ol>
+    <li>A <a href="#dfn-webvtt-metadata-header-name" class="internalDFN">WebVTT metadata header name</a>.</li>
+    <li>A U+003A COLON (colon) character.</li>
+    <li>A <a href="#dfn-webvtt-metadata-header-value" class="internalDFN">WebVTT metadata header value</a>.</li>
+    <li>A <a href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminator</a>.</li>
+  </ol>
+
+  <p>A <dfn id="dfn-webvtt-metadata-header-name">WebVTT metadata header name</dfn> and
+  a <dfn id="dfn-webvtt-metadata-header-value">WebVTT metadata header value</dfn>
+  each consist of any sequence of zero or more characters other than
+  U+000A LINE FEED (LF) characters and U+000D CARRIAGE RETURN (CR) characters
+  except that the entire resulting string must not contain the substring
+  "<code>--&gt;</code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS,
+  U+003E GREATER-THAN SIGN).</p>
+
+
   <p>A <dfn id="dfn-webvtt-cue">WebVTT cue</dfn> consists of the following components, in
   the given order:</p>
 
   <ol>
    <li>Optionally, a <a href="#dfn-webvtt-cue-identifier" class="internalDFN">WebVTT cue identifier</a> followed by a <a href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminator</a>.</li>
    <li><a href="#dfn-webvtt-cue-timings" class="internalDFN">WebVTT cue timings</a>.</li>
-   <li>Optionally, one or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters followed by <a href="#dfn-webvtt-cue-settings" class="internalDFN">WebVTT cue settings</a>.</li>
+   <li>Optionally, one or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters followed by a <a href="#dfn-webvtt-cue-settings-list" class="internalDFN">WebVTT cue settings list</a>.</li>
    <li>A <a href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminator</a>.</li>
    <li>The <dfn id="dfn-cue-payload">cue payload</dfn>: either <a href="#dfn-webvtt-cue-text" class="internalDFN">WebVTT cue text</a>, <a href="#dfn-webvtt-chapter-title-text" class="internalDFN">WebVTT chapter title text</a>, or <a href="#dfn-webvtt-metadata-text" class="internalDFN">WebVTT metadata text</a>, but it must not contain the substring "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</li>
+   <li>A <a href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminator</a>.</li>
   </ol>
 
   <div class="note"><div class="note-title" role="heading" aria-level="4"><span>Note</span></div><p class="">A <a href="#dfn-webvtt-cue" class="internalDFN">WebVTT cue</a> corresponds to one piece
@@ -845,59 +977,6 @@
   example one subtitle. The <a href="#dfn-cue-payload" class="internalDFN">cue payload</a> is the text or
   data associated with the cue.</p></div>
 
-  <p><a href="#dfn-webvtt-chapter-title-text" class="internalDFN">WebVTT chapter title text</a> is syntactically a subset
-  of <a href="#dfn-webvtt-cue-text" class="internalDFN">WebVTT cue text</a>, and <a href="#dfn-webvtt-cue-text" class="internalDFN">WebVTT cue text</a> is
-  syntactically a subset of <a href="#dfn-webvtt-metadata-text" class="internalDFN">WebVTT metadata text</a>.
-  Conformance checkers, when validating <a href="#dfn-webvtt" class="internalDFN">WebVTT</a> files, may
-  offer to restrict all cues to only having <a href="#dfn-webvtt-chapter-title-text" class="internalDFN">WebVTT chapter title
-  text</a> or <a href="#dfn-webvtt-cue-text" class="internalDFN">WebVTT cue text</a> as their <a href="#dfn-cue-payload" class="internalDFN">cue
-  payload</a>; <a href="#dfn-webvtt-metadata-text" class="internalDFN">WebVTT metadata text</a> cues are only
-  useful for scripted applications (using the <code title="dom-TextTrack-kind-metadata">metadata</code> <a href="#dfn-text-track-kind" class="internalDFN">text
-  track kind</a>).</p>
-
-  <p>A <a href="#dfn-webvtt-file" class="internalDFN">WebVTT file</a> whose cues all have a <a href="#dfn-cue-payload" class="internalDFN">cue
-  payload</a> that is <a href="#dfn-webvtt-chapter-title-text" class="internalDFN">WebVTT chapter title text</a> is
-  said to be a <dfn id="dfn-webvtt-file-using-chapter-title-text">WebVTT file using chapter title text</dfn>.</p>
-
-  <p>A <a href="#dfn-webvtt-file" class="internalDFN">WebVTT file</a> whose cues all have a <a href="#dfn-cue-payload" class="internalDFN">cue
-  payload</a> that is <a href="#dfn-webvtt-cue-text" class="internalDFN">WebVTT cue text</a> is said to be a
-  <dfn id="dfn-webvtt-file-using-cue-text">WebVTT file using cue text</dfn>. By definition, any file that
-  is a <a href="#dfn-webvtt-file-using-chapter-title-text" class="internalDFN">WebVTT file using chapter title text</a> is also a
-  <a href="#dfn-webvtt-file-using-cue-text" class="internalDFN">WebVTT file using cue text</a>.</p>
-
-
-  <p>A <dfn id="dfn-webvtt-comment">WebVTT comment</dfn> consists of the  following components, in
-  the given order:</p>
-
-  <ol>
-   <li>The string "<code title="">NOTE</code>".</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 <a href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminator</a>.</li>
-      </ul>
-     </li><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
-     <a href="#dfn-webvtt-line-terminator" class="internalDFN">WebVTT line terminator</a>, except that the entire resulting string must not contain
-     the substring "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).
-    </li></ol>
-   </li>
-  </ol>
-
-  <div class="note"><div class="note-title" role="heading" aria-level="4"><span>Note</span></div><p class="">A <a href="#dfn-webvtt-comment" class="internalDFN">WebVTT comment</a> is ignored by the parser.</p></div>
-
-
-  <p>A <dfn id="dfn-webvtt-line-terminator">WebVTT line terminator</dfn> consists of one of the
-  following:</p>
-
-  <ul class="brief">
-   <li>A U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.</li>
-   <li>A single U+000A LINE FEED (LF) character.</li>
-   <li>A single U+000D CARRIAGE RETURN (CR) character.</li>
-  </ul>
-
   <p>A <dfn id="dfn-webvtt-cue-identifier">WebVTT cue identifier</dfn> is any sequence of one or more
   characters not containing the substring "<code title="">--&gt;</code>"
   (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN
@@ -942,78 +1021,52 @@
   and end offsets of the <a href="#dfn-webvtt-cue" class="internalDFN">WebVTT cue</a>. Different cues can
   overlap. Cues are always listed ordered by their start time.</p></div>
 
-  <p>A <a href="#dfn-webvtt-file" class="internalDFN">WebVTT file</a> whose cues all have an end time offset
-  <var title="">x</var> greater than or equal to the end time offsets
-  of all the cues whose start time offsets are less than <var title="">x</var> is said to be a <dfn id="dfn-webvtt-file-using-only-nested-cues">WebVTT file using only nested

[1693 lines skipped]

Received on Saturday, 6 July 2013 02:23:08 UTC