Introduce WebVTT Region, WebVTT region object and DOM construction rules for WebVTT region objects.
authorSilvia Pfeiffer
Sun, 10 Feb 2013 16:56:33 +1100
changeset 61 096bf69dd1f1
parent 60 38e7dea7f752
child 62 9bf82099e923
Introduce WebVTT Region, WebVTT region object and DOM construction rules for WebVTT region objects.
608toVTT/region.html
--- a/608toVTT/region.html	Sat Feb 09 09:36:18 2013 +1100
+++ b/608toVTT/region.html	Sun Feb 10 16:56:33 2013 +1100
@@ -90,14 +90,15 @@
 
       <p><i>This section is non-normative.</i></p>
 
-      <p>WebVTT <a href="#refsWEBVTT">[WEBVTT]</a> is a pretty nifty caption format with lots of capabilities for formatting and positioning of cues. From a TV perspective it satisfies the needs of pop-on and paint-on captions. However, the need for rollup-captions can only be satisfied with very clunky copying of cues and manual positioning.
+      <p>WebVTT <a href="#refsWEBVTT">[WEBVTT]</a> is a pretty nifty caption format with lots of capabilities for formatting and positioning of cues. From a TV perspective it satisfies the needs of pop-on and paint-on captions. However, the need for rollup captions can only be satisfied with very clunky copying of cues and manual positioning.
       </p>
 
+      <p>This document introduces the concept of "regions" into WebVTT to specify rollup captions following a very similar concept to that used in CEA-708 Digital TV Captioning <a href="#refsFCC">[CEA-708]</a>.</p>
+
       <section>
         <h3>The "region" concept</h3>
 
-        <p>WebVTT currently deals with two layout concepts: the text area that is to be rendered, and the video viewport. (Actually, there is a third: the line box - but it is orthogonal to the issue at hand.) In other caption formats (in particular in CEA-608 and CEA-708), a third concept exists: the concept of a rendering region which holds multiple cues. It is called "window" in CEA-708 <a
-          href="#refsFCC">[CEA-708]</a>.
+        <p>WebVTT currently deals with two layout concepts: the text area that is to be rendered, and the video viewport. (Actually, there is a third: the line box - but it is orthogonal to the issue at hand.) In other caption formats (in particular in CEA-608 and CEA-708), a third concept exists: the concept of a rendering region which holds multiple cues. It is called "window" in CEA-708 <a href="#refsFCC">[CEA-708]</a>.
         </p>
 
         <p>This specification introduces the CEA-708 "window" concept into WebVTT under the term "region", because the term "window" already bears a different meaning on the Web. This specification's main goal is to allow for a simple implementation of rollup captions, but it also satisfies other use cases:
@@ -125,7 +126,7 @@
       <section>
         <h3>Example WebVTT file with regions</h3>
 
-        <p>In the following example there are two regions containing rollup captions for two different speakers. Fred's cues scroll up in the left half of the video and the first cue disappears at 12.5sec even because it is limited to 3 lines even through it is defined until 20sec:
+        <p>The following 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. Bill'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
@@ -158,16 +159,16 @@
     </section>
 
     <section>
-      <h2>Extension of the text track model</h2>
+      <h2>Extension of the HTML text track model</h2>
 
       <p>The WebVTT specification references the <a class="externalDFN" href="http://www.whatwg.org/specs/web-apps/current-work/#text-track-model">text track model</a> of the HTML specification <a href="#refsHTML">[HTML]</a> to define the core terms of the WebVTT specification.</p>
 
-      <p>This specification introduces the concepts of a <a class="internalDFN" href="#text-track-region">text track region</a> and a <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>, and extends the concept of a <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#text-track-cue" class="externalDFN">text track cue</a>.</p>
+      <p>This specification introduces the concepts of a <a class="internalDFN" href="#text-track-region">text track region</a> and a <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>, and extends the concept of a <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue" class="externalDFN">text track cue</a>.</p>
 
       <section>
         <h3>Text track region</h3>
 
-        <p>A <dfn id="text-track-region">text track region</dfn> represents a subpart of the video viewport and provides a rendering area for <a class="externalDFN" href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#text-track-cue">text track cues</a>.</p>
+        <p>A <dfn id="text-track-region">text track region</dfn> represents a subpart of the video viewport and provides a rendering area for <a class="externalDFN" href="http://www.w3.org/TR/html5/single-page.html#text-track-cue">text track cues</a>.</p>
 
         <p>Each <a href="#text-track-region" class="internalDFN">text track region</a> consists of:</p>
 
@@ -220,7 +221,7 @@
 
         <dd>
 
-         <p>A list of <a href="#text-track-region" class="internalDFN">text track regions</a>. The <a href="#text-track-list-of-regions" class="internalDFN">list of regions of a text track</a> can change dynamically, either because the <a href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track" class="externalDFN">text track</a> has <a class="externalDFN" href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track-not-loaded">not yet been loaded</a> or is still <a class="externalDFN" href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track-loading">loading</a>.</p>
+         <p>A list of <a href="#text-track-region" class="internalDFN">text track regions</a> . The <a href="#text-track-list-of-regions" class="internalDFN">list of regions of a text track</a> can change dynamically, either because the <a href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track" class="externalDFN">text track</a> has <a class="externalDFN" href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track-not-loaded">not yet been loaded</a> or is still <a class="externalDFN" href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track-loading">loading</a>.</p>
 
         </dd>
       </section>
@@ -228,7 +229,7 @@
       <section>
         <h3>Extension of text track cue</h3>
 
-        <p>In addition to the existing attributes, each <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#text-track-cue" class="externalDFN"><dfn>text track cue</dfn></a> also consists of:</p>
+        <p>In addition to the existing attributes, each <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue" class="externalDFN"><dfn>text track cue</dfn></a> also consists of:</p>
 
         <dl>
          <dt><dfn id="text-track-cue-region">A region reference</dfn></dt>
@@ -311,15 +312,11 @@
       </section>
 
       <section>
-        <h3>WebVTT region settings syntax</h3>
+        <h3>WebVTT region and WebVTT region settings syntax</h3>
 
-        <p>The <dfn id="webvtt-region-setting">WebVTT region settings</dfn>
-        part of a <a href="#webvtt-region-metadata-header">WebVTT region metadata header</a>
-        consists of zero or more of the following components, in
-        any order, separated from each other by one or more U+0020 SPACE
-        characters or U+0009 CHARACTER TABULATION (tab) characters. Each
-        component must not be included more than once per <a href="#webvtt-region-setting">WebVTT
-        region setting</a> string.</p>
+        <p>A <dfn id="webvtt-region">WebVTT region</dfn> represents its <a href="#webvtt-region-setting" class="internalDFN">region settings</a>.</p>
+        
+        <p>The <dfn id="webvtt-region-setting">WebVTT region settings</dfn> part of a <a href="#webvtt-region-metadata-header" class="internalDFN">WebVTT region metadata header</a> consists of zero or more of the following components, in any order, separated from each other by one or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters. Each component must not be included more than once per <a href="#webvtt-region-setting" class="internalDFN">WebVTT region setting</a> string.</p>
 
         <ul class="brief"> 
          <li>A <a href="#webvtt-region-identifier">WebVTT region identifier</a>.</li>
@@ -474,20 +471,18 @@
       <h2>Extension of the WebVTT parser algorithm</h2>
 
       <p>The <a
-      href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#text-track-model"
+      href="http://www.w3.org/TR/html5/single-page.html#text-track-model"
       class="externalDFN">WebVTT parser algorithm</a> is extended to parse the <a class="internalDFN"
       href="#webvtt-metadata-header">WebVTT region metadata header</a> and the <a class="internalDFN"
       href="#webvtt-region-cue-setting">WebVTT region cue setting</a>.</p>
 
-      <p>
-
       <section>
         <h3>Extension of WebVTT header parsing (step 11-15)</h3>
 
         <p>This is an extension of the <a class="externalDFN"
         href="http://dev.w3.org/html5/webvtt/#webvtt-parser-algorithm">WebVTT parser algorithm</a>.</p>
 
-        <p>Introduce an additional variable <var>regions</var> to be a <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</p>
+        <p>Introduce an additional variable <var>regions</var> to be a <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>, which the <a href="http://dev.w3.org/html5/webvtt/#webvtt-parser" class="externalDFN">WebVTT parser</a> will create in addition to the <a href="http://www.w3.org/TR/html5/single-page.html#text-track-list-of-cues" class="externalDFN">text track list of cues</a> <var>output</var>.</p>
 
         <ol start="15">
           <li><i>Metadata header loop</i>: If <var>line</var> is not the empty string, run the following substeps:
@@ -506,7 +501,8 @@
                   <li>Let <var>region</var>'s <a href="#text-track-region-viewport-anchor">viewport anchor point</a> be (0,100).</li>
                   <li>Let <var>region</var>'s <a href="#text-track-region-scroll">scroll value</a> be <a href="#text-track-region-scroll-none" class="interalDFN">NONE</a>.</li>
                   <li><a href="#collect-webvtt-region-settings">Collect WebVTT region settings</a> from <a href="#webvtt-metadata-header-value" class="internalDFN">metadata's value</a> using <var>region</var> for the results.</li>
-                  <li>Add <var>region</var> to the <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</li>
+                  <li><i>Region processing</i>: Construct a <a href="#webvtt-region-object" class="internalDFN">WebVTT Region Object</a> from <var>region</var>, follow the <a href="#webvtt-region-dom-construction" class="internalDFN">WebVTT region DOM construction rule</a> and have the <a href="#webvtt-region-object" class="internalDFN">WebVTT Region Object</a> take part in the <a href="http://dev.w3.org/html5/webvtt/#webvtt-cue-text-rendering-rules" class="externalDFN">WebVTT cue text rendering rules</a> extended as below.</li>
+                  <li>Add <var>region</var> to the <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a> <var>regions</var>.</li>
                </ol>
               </li>
               <li><p>Jump back to the step labeled header.</p></li>
@@ -539,7 +535,7 @@
          <li><p>Return <var>percentage</var>.</p></li>
         </ol>
 
-        <p>When the algorithm above requires that the user agent <dfn id="collect-webvtt-region-settings">collect WebVTT region settings</dfn> from a string <var>input</var> for a <a href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track" class="externalDFN">text track</a>, the user agent must run the following algorithm:</p>
+        <p>When the algorithm above requires that the user agent <dfn id="collect-webvtt-region-settings">collect WebVTT region settings</dfn> from a string <var>input</var> for a <a href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-track" class="externalDFN">text track</a>, the user agent must run the following algorithm. This algorithm returns a list of WebVTT Region Objects.</p>
 
         <ol>
           <li><p>Let <var>settings</var> be the result of <a href="http://www.w3.org/TR/html5/single-page.html#split-a-string-on-spaces" class="externalDFN">splitting <var
@@ -654,15 +650,38 @@
         <p>Also add an additional step 5 to the algorithm to <A class="externalDFN" href="http://dev.w3.org/html5/webvtt/#parse-the-webvtt-settings">parse the WebVTT settings</a>:</p>
 
         <ol start="5">
-          <li>If <var>cue</var>'s <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-line-position" class="externalDFN">line position</a> is not <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-automatic-line-position" class="externalDFN">auto</a> and <var>cue</var>'s <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-size" class="externalDFN">size</a> is not 100 and <var>cue</var>'s <a href="#text-track-cue-region" class="internalDFN">region reference</a> is not the empty string, let <var>cue</var>'s <a href="#text-track-cue-region" class="internalDFN">region reference</a> be the empty string.</li>
+          <li>If <var>cue</var>'s <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-line-position" class="externalDFN">line position</a> is not <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-automatic-line-position" class="externalDFN">auto</a> or <var>cue</var>'s <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-size" class="externalDFN">size</a> is not 100 or <var>cue</var>'s <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-writing-direction"
+          class="externalDFN">writing direction</a> is not <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-horizontal-writing-direction" class="externalDFN">horizontal</a>, but <var>cue</var>'s <a href="#text-track-cue-region" class="internalDFN">region reference</a> is not the empty string, let <var>cue</var>'s <a href="#text-track-cue-region" class="internalDFN">region reference</a> be the empty string.</li>
         </ol>
 
-        <p class="note">This makes sure that no matter in which order the cue settings are provided, if the cue has a <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-line-position" class="externalDFN">line position</a> or a <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-size" class="externalDFN">size</a> setting, the <a href="#text-track-cue-region" class="internalDFN">region reference</a> will be ignored.</p>
+        <p class="note">This makes sure that no matter in which order the cue settings are provided, if the cue has a <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-line-position" class="externalDFN">line position</a> or a <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-size" class="externalDFN">size</a> setting or is <a href="http://www.w3.org/TR/html5/single-page.html#text-track-cue-vertical-writing-direction" class="externalDFN">vertical</a>, the <a href="#text-track-cue-region" class="internalDFN">region reference</a> will be ignored.</p>
       </section>
     </section>
 
+
     <section>
-      <h2>WebVTT region DOM construction rules</h2>
+      <h3>WebVTT region object</h3>
+
+      <p>A <dfn id="webvtt-region-object">WebVTT region object</dfn> is a conceptual construct to represent a <a href="#webvtt-region" class="internalDFN">WebVTT region</a> that can be used as a root node for <a href="http://dev.w3.org/html5/webvtt/#list-of-webvtt-node-objects" class="externalDFN">lists of WebVTT node objects</a>.</p>
+    </section>
+
+
+    <section>
+      <h2>WebVTT DOM construction rules</h2>
+
+      <p>In addition to the <a href="http://dev.w3.org/html5/webvtt/#webvtt-cue-text-dom-construction-rules" class="externalDFN">WebVTT cue text DOM construction rules</a> we also need to create nodes for <a href="#webvtt-region-object">WebVTT region objects</a>.</p>
+
+      <p>To convert a <a href="#webvtt-region-object">WebVTT region object</a> to a DOM tree for <code>Document</code> <var>owner</var>, user agents must map a <a href="#webvtt-region">WebVTT region object</a> to a DocumentFragment node.</p>
+    </section>
+
+
+    <section>
+      <h3>Rules for updating the display of WebVTT text tracks</h3>
+
+      <p>The <a href="http://dev.w3.org/html5/webvtt/#rules-for-updating-the-display-of-webvtt-text-tracks" class="externalDFN">rules for updating the display of WebVTT text tracks</a> are defined in the WebVTT specification to render the text tracks of a HTML video element and result in a set of CSS boxes that covers the rendering area of the video element.</p>
+
+      <p>These rules are extended with the following steps.</p>
+
     </section>
 
     <section class='appendix'>