Add text track list of regions to the text track model.
authorSilvia Pfeiffer
Thu, 07 Feb 2013 12:40:59 +1100
changeset 56 8807cb6f4645
parent 55 08f3dc408ee4
child 57 0965371cb3a8
Add text track list of regions to the text track model.
Describe WebVTT metadata header parsing.
608toVTT/region.html
--- a/608toVTT/region.html	Wed Feb 06 18:02:23 2013 +1100
+++ b/608toVTT/region.html	Thu Feb 07 12:40:59 2013 +1100
@@ -160,10 +160,11 @@
 
       <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 concept of a <a class="internalDFN" href="#text-track-region">text track region</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/html/wg/drafts/html/master/embedded-content-0.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>Each <a href="#text-track-region" class="internalDFN">text track region</a> consists of:</p>
@@ -195,14 +196,34 @@
           <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 id="text-track-region-scroll">A scroll flag</dfn></dt>
+         <dt><dfn id="text-track-region-scroll">A scroll value</dfn></dt>
          <dd>
-          <p>A flag indicating whether cues within the region are to stay fixed "none" or scroll "up" as new cues are added to the region.</p><!-- in the future we may introduce scroll="down"-->
+          <p>One of the following:</p>
+          <dl>
+            <dt>None</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>Up</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>
       </section>
 
       <section>
+        <h3>Text track list of regions</h3>
+
+        <dt><dfn id="text-track-list-of-regions">A list of zero or more regions</dfn>
+
+        <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>
+
+        </dd>
+      </section>
+
+      <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>
@@ -210,7 +231,7 @@
         <dl>
          <dt><dfn id="text-track-cue-region">A region reference</dfn></dt>
          <dd>
-          <p>A string that identifies the region that a cue belongs to, if it is not null.</p>
+          <p>A string that references by identifier the region that a cue belongs to, if it is not null.</p>
          </dd>
         </dl>
       </section>
@@ -237,29 +258,17 @@
 
           <li>The string "<code title="">WEBVTT</code>".</li>
 
-          <li>Optionally, either a U+0020 SPACE character or a U+0009
-          CHARACTER TABULATION (tab) character followed by any number of
-          characters that are not U+000A LINE FEED (LF) or U+000D CARRIAGE
-          RETURN (CR) characters.</li> <!-- allows for Emacs line -->
-
-          <li>One or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN">WebVTT line
-          terminator</a> to terminate the line with the file magic and separate
-          it from the rest of the file body.</li>
+          <li>Optionally, either a U+0020 SPACE character or a U+0009 CHARACTER TABULATION (tab) character followed by any number of characters that are not U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters.</li> <!-- allows for Emacs line -->
 
-          <li>Zero or more <a href="#webvtt-metadata-header" title="WebVTT metadata header" class="internalDFN">WebVTT metadata headers</a> and
-          <a href="http://dev.w3.org/html5/webvtt/#webvtt-comment" class="externalDFN" title="WebVTT comment">WebVTT comments</a> separated from each other by two or
-          more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN" title="WebVTT line terminator">WebVTT line terminators</a>.</li>
+          <li>One or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN">WebVTT line terminator</a> to terminate the line with the file magic and separate it from the rest of the file body.</li>
 
-          <li>One or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN" title="WebVTT line terminator">WebVTT line
-          terminators</a> to terminate the header block and separate the cues from
-          the file header.</li>
+          <li>Zero or more <a href="#webvtt-metadata-header" title="WebVTT metadata header" class="internalDFN">WebVTT metadata headers</a> and <a href="http://dev.w3.org/html5/webvtt/#webvtt-comment" class="externalDFN" title="WebVTT comment">WebVTT comments</a> separated from each other by two or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN" title="WebVTT line terminator">WebVTT line terminators</a>.</li>
 
-          <li>Zero or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-cue" class="externalDFN" title="WebVTT cue">WebVTT cues</a> and <a href="http://dev.w3.org/html5/webvtt/#webvtt-comment" class="externalDFN" title="WebVTT
-          comment">WebVTT comments</a> separated from each other by two or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN"  title="WebVTT
-          line terminator">WebVTT line terminators</a>.</li>
+          <li>One or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN" title="WebVTT line terminator">WebVTT line terminators</a> to terminate the header block and separate the cues from the file header.</li>
 
-          <li>Zero or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN" title="WebVTT line terminator">WebVTT line
-          terminators</a>.</li>
+          <li>Zero or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-cue" class="externalDFN" title="WebVTT cue">WebVTT cues</a> and <a href="http://dev.w3.org/html5/webvtt/#webvtt-comment" class="externalDFN" title="WebVTT comment">WebVTT comments</a> separated from each other by two or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN"  title="WebVTT line terminator">WebVTT line terminators</a>.</li>
+
+          <li>Zero or more <a href="http://dev.w3.org/html5/webvtt/#webvtt-line-terminator" class="externalDFN" title="WebVTT line terminator">WebVTT line terminators</a>.</li>
         </ol>
       </section>
 
@@ -471,24 +480,36 @@
       <p>
 
       <section>
-        <h3>Extension of WebVTT header parsing</h3>
+        <h3>Extension of WebVTT header parsing (step 11-15)</h3>
 
-        <p>This is an extension of step 15 of the <a class="externalDFN"
+        <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>
+
         <ol start="15">
           <li><i>Metadata header loop</i>: If <var>line</var> is not the empty string, run the following substeps:
             <ol>
-              <li><i>Metadata header creation</i>: Let <var>field</var> be a new <>
-              <li>jump back to the step labeled header</li>
+              <li><i>Metadata header creation</i>: Let <var>metadata</var> be a new <a class="internalDFN" href="#webvtt-metadata-header">WebVTT metadata header</a>.
+              <li>Let <a href="#webvtt-metadata-header-name" class="internalDFN">metadata's name</a> be the empty string.</li>
+              <li>Let <a href="#webvtt-metadata-header-value" class="internalDFN">metadata's value</a> be the empty string.</li>
+              <li>If <var>line</var> contains the character ":" (A U+003A COLON), then set <a href="#webvtt-metadata-header-name" class="internalDFN">metadata's name</a> to the substring of <var>line</var> before the first ":" character and <a href="#webvtt-metadata-header-value" class="internalDFN">metadata's value</a> to the substring after this character.</li>
+              <li>If <a href="#webvtt-metadata-header-name" class="internalDFN">metadata's name</a> equals "Region" exactly: Add <var>metadata</var> to the <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</li>
+              <li>Jump back to the step labeled header.</li>
             </ol>
           </li>
         </ol>
 
+        <p class="note">This specification ignores all WebVTT metadata headers that don't specify regions.</p>
       </section>
 
       <section>
-        <h3>Extension of WebVTT cue creation</h3>
+        <h3>Extension of WebVTT cue creation (step 20-35)</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>
+
+
       </section>
     </section>