Started a spec for "region"
authorSilvia Pfeiffer
Mon, 04 Feb 2013 22:53:54 +1100
changeset 53 fb5e173ebd94
parent 52 580a3e4c4f7f
child 54 412701c36230
Started a spec for "region"
608toVTT/region.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/608toVTT/region.html	Mon Feb 04 22:53:54 2013 +1100
@@ -0,0 +1,286 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>WebVTT Extension: Regions for rendering cue groups</title>
+    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
+    <!-- 
+      === NOTA BENE ===
+      For the three scripts below, if your spec resides on dev.w3 you can check them
+      out in the same tree and use relative links so that they'll work offline,
+     -->
+    <!-- old but local: <script src='../../2009/dap/ReSpec.js/js/respec.js' class='remove'></script> -->
+    <script src='http://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script>
+    <script class='remove'>
+      var respecConfig = {
+          // specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
+          specStatus:           "unofficial",
+          
+          // the specification's short name, as in http://www.w3.org/TR/short-name/
+          shortName:            "webvtt-region",
+
+          // if your specification has a subtitle that goes below the main
+          // formal title, define it here
+          // subtitle   :  "",
+
+          // if you wish the publication date to be other than today, set this
+          // publishDate:  "2009-08-06",
+
+          // if the specification's copyright date is a range of years, specify
+          // the start date here:
+          copyrightStart: "2013",
+
+          // if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
+          // and its maturity status
+          // previousPublishDate:  "1977-03-15",
+          // previousMaturity:  "WD",
+
+          // if there a publicly available Editor's Draft, this is the link
+          edDraftURI:           "http://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html",
+
+          // if this is a LCWD, uncomment and set the end of its review period
+          // lcEnd: "2009-08-05",
+
+          // if you want to have extra CSS, append them to this list
+          // it is recommended that the respec.css stylesheet be kept
+          extraCSS:             ["http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"],
+
+          // editors, add as many as you like
+          // only "name" is required
+          editors:  [
+              { name: "Silvia Pfeiffer", url: "http://www.gingertech.net/",
+                company: "Google Inc.", companyURL: "http://google.com/" },
+          ],
+
+          // authors, add as many as you like. 
+          // This is optional, uncomment if you have authors as well as editors.
+          // only "name" is required. Same format as editors.
+
+          //authors:  [
+          //    { name: "Your Name", url: "http://example.org/",
+          //      company: "Your Company", companyURL: "http://example.com/" },
+          //],
+          
+          // name of the WG
+          wg:           "Text Tracks Community Group",
+          
+          // URI of the public WG page
+          wgURI:        "http://www.w3.org/community/texttracks/",
+          
+          // name (without the @w3c.org) of the public mailing to which comments are due
+          wgPublicList: "public-texttracks",
+          
+          // URI of the patent status for this WG, for Rec-track documents
+          // !!!! IMPORTANT !!!!
+          // This is important for Rec-track documents, do not copy a patent URI from a random
+          // document unless you know what you're doing. If in doubt ask your friendly neighbourhood
+          // Team Contact.
+          wgPatentURI:  "",
+      };
+    </script>
+  </head>
+  <body>
+    <section id='abstract'>
+        <p></p>
+    </section>
+
+    <section>
+      <h2>Introduction</h2>
+
+      <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>
+
+      <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>
+
+        <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:
+        </p>
+
+        <ul>
+          <li>It introduces the ability to move a group of captions from one location on the video to another without having to copy the cues.</li>
+          <li>It introduces the ability to style the region's background and border differently from the cues it contains.</li>
+          <li>It introduces a means to specify an anchor point and a growth direction for the text that is rendered on screen and thus gives the author more control over the placement of text when the user changes the font size.</li>
+          <li>It introduces the ability to specify a caption rendering region of fixed width with a fixed number of rendered lines to also give the author more control over the amount of space on the video viewport that captions will take up when the user changes font size.</li>
+          <li>It introduces the ability to specify which region should be rendered in the foreground in the case of region overlap e.g. when the user increases caption font size.</li>
+        </ul>
+
+        <p>Many of these features are part of what the US FCC (Federal Communications Commission) has required for Captioning of Internet Video Programming <a
+          href="#refsFCC">[FCC]</a>.
+        </p>
+      </section>
+
+      <p>This specification is the result of discussions in the <a href="http://www.w3.org/community/texttracks/">W3C Text Tracks Community Group (CG)</a>. The intention is to provide a backwards compatible extension to the WebVTT specification <a href="#refsWEBVTT">[WEBVTT]</a> such that the lack of support of the "region" feature in video players doesn't stop a WebVTT file with regions from being parsed and displayed on top of the video.
+      </p>
+
+      <p>The "region" specification in this document specifies the most fundamental concepts. There are many ways in which this specification can be extended and in fact some ideas have been discussed on the <a href="http://www.w3.org/community/texttracks/wiki/MultiCueBox">W3C Text Tracks CG wiki</a>. We will wait for browser vendors to implement the core features and for developers to provide feedback on their use cases and needs before extending this specification.
+      </p>
+
+      <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>
+
+        <pre>WEBVTT
+Region: id=fred width=50% height=3 regionanchor=0%,100% viewportanchor=10%,90% scroll=up
+Region: id=bill width=50% height=3 regionanchor=100%,100% viewportanchor=90%,90% scroll=up
+
+00:00:00.000 --> 00:00:20.000 region:fred align:left
+Hi, my name is Fred
+
+00:00:02.500 --> 00:00:22.500 region:bill align:right
+Hi, I'm Bill
+
+00:00:05.000 --> 00:00:25.000 region:fred align:left
+Would you like to get a coffee?
+
+00:00:07.500 --> 00:00:27.500 region:bill align:right
+Sure! I've only had one today.
+
+00:00:10.000 --> 00:00:30.000 region:fred align:left
+This is my fourth!
+
+00:00:12.500 --> 00:00:32.500 region:fred align:left
+OK, let's go.</pre>
+      </section>
+    
+      <p>All terms used in this specification that are not (re-)defined in this specification
+      rely on terms specified in the WebVTT specification <a href="#refsWEBVTT">[WEBVTT]</a>.
+      </p>
+    </section>
+
+    <section>
+      <h2>Region definition syntax</h2>
+
+      <p>The <a href="#http://dev.w3.org/html5/webvtt/#parsing">WebVTT parser</a> is flexible when parsing the header of a WebVTT file and allows for characters to be present before the first cue in the file. We take advantage of this extension point of the WebVTT spec to introduce the specification of regions in the header of WebTT files.
+      </p>
+
+      <section>
+        <h3>Extension of the WebVTT file body syntax</h3>
+
+        <p>The specification of a the <a class="externalDFN" href="http://dev.w3.org/html5/webvtt/#webvtt-file-body">"WebVTT file body" syntax in the WebVTT specification</a> is extended to the following:
+        </p>
+
+        <p>A <dfn id="webvtt-file-body">WebVTT file body</dfn> consists of the following
+        components, in the following order:</p>
+
+        <ol>
+          <li>An optional U+FEFF BYTE ORDER MARK (BOM) character.</li>
+
+          <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>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" 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-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>
+
+      <section>
+        <h3>WebVTT metadata header syntax</h3>
+
+        <p>A <dfn id="webvtt-metadata-header">WebVTT metadata header</dfn> consists of the following components, in
+        the given order:</p>
+
+        <ol>
+          <li>A <a href="#webvtt-metadata-header-name" class="internalDFN">WebVTT metadata header name</a>.</li>
+          <li>A U+003A COLON (colon) character.</li>
+          <li>A <a href="#webvtt-metadata-header-value" class="internalDFN">WebVTT metadata header value</a>.</li>
+        </ol>
+
+        <p>A <dfn id="webvtt-metadata-header-name">WebVTT metadata header name</dfn> and
+        a <dfn id="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 title="">--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS,
+        U+003E GREATER-THAN SIGN).</p>
+      </section>
+
+      <section>
+        <h3>WebVTT region metadata header syntax</h3>
+
+        <p>A <dfn id="webvtt-region-metadata-header">WebVTT region metadata header</dfn> is a special kind of
+        <a href="#webvtt-metadata-header" class="internalDFN">WebVTT metadata header</a> where both of the following apply:
+        
+        <ul>
+          <li>The <a href="#webvtt-metadata-header-name" class="internalDFN">WebVTT metadata header name</a> is the string
+          "<code title="">Region</code>".</li>
+          <li>The <a href="#webvtt-metadata-header-value" class="internalDFN">WebVTT metadata header value</a> are <a href="#webvtt-region-metadata-header" class="internalDFN">WebVTT region settings</a>.
+          </li>
+        </ul>
+        </p>
+      </section>
+
+      <section>
+        <h3>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>
+
+        <ul class="brief"> 
+         <li>A <a href="#webvtt-region-identifier">WebVTT region identifier</a>.</li>
+         <li>A <a href="#webvtt-region-width">WebVTT region width setting</a>.</li> <!-- width:80% -->
+         <li>A <a href="#webvtt-region-height">WebVTT region height setting</a>.</li> <!-- height:3 -->
+         <li>A <a href="#webvtt-region-anchor">WebVTT region anchor setting</a>.</li> <!-- regionanchor:0%,100% -->
+         <li>A <a href="#webvtt-region-viewport-anchor">WebVTT region viewport anchor setting</a>.</li> <!-- viewportanchor:10%,90% -->
+         <li>A <a href="#webvtt-region-scroll">WebVTT region scroll setting</a>.</li> <!-- scroll:up -->
+        </ul>
+
+        <p class="note"><a href="#webvtt-region-settings">WebVTT region settings</a> give configuration
+        options regarding the position and alignment of the cue. For
+        example, it allows a cue to be aligned to the left or positioned at
+        the top right.</p>
+
+      </section>
+    </section>
+
+
+    <section class='appendix'>
+      <h2>References</h2>
+      <dl>
+       <dt id="refs708">[CEA-708]</dt>
+       <dd><cite><a href="http://www.ce.org/Standards/Standard-Listings/R4-3-Television-Data-Systems-Subcommittee/CEA-708-D.aspx">CEA-708-D: Digital Television (DTV) Closed Captioning</a></cite>, CEA (Consumer Electronics Association).</dd>
+
+       <dt id="refsFCC">[FCC]</dt>
+       <dd><cite><a href="http://www.fcc.gov/guides/captioning-internet-video-programming">Captioning of Internet Video Programming, 13 June 2012</a></cite>, US FCC (Federal Communications Commission).</dd>
+
+       <dt id="refsWEBVTT">[WEBVTT]</dt>
+       <dd><cite><a href="http://dev.w3.org/html5/webvtt/">WebVTT: Web Video Text Tracks</a></cite>, Ian Hickson. W3C.</dd>
+
+      </dl>
+    </section>
+    
+  </body>
+</html>