- From: CVS User pjgenste <cvsmail@w3.org>
- Date: Thu, 30 Jan 2014 22:16:17 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/webvtt In directory roscoe:/tmp/cvs-serv21180 Modified Files: Overview.html Log Message: Sync WebVTT with Git commit cf092ded7e426406a66178ace18fbac9de8ecac4 --- /sources/public/html5/webvtt/Overview.html 2014/01/29 00:28:56 1.100 +++ /sources/public/html5/webvtt/Overview.html 2014/01/30 22:16:17 1.101 @@ -287,7 +287,7 @@ </p> <h1 class="title p-name" id="title" property="dcterms:title">WebVTT: The Web Video Text Tracks Format</h1> - <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-01-29T00:28:51.000Z" id="draft-community-group-specification-29-january-2014">Draft Community Group Specification <time class="dt-published" datetime="2014-01-29">29 January 2014</time></h2> + <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-01-30T22:16:12.000Z" id="draft-community-group-specification-30-january-2014">Draft Community Group Specification <time class="dt-published" datetime="2014-01-30">30 January 2014</time></h2> <dl> @@ -348,7 +348,7 @@ <p>This specification is being developed as a Living Specification. There is a plan to take a snapshot and publish it as a W3C Recommendation through the <a href="http://www.w3.org/AudioVideo/TT/">W3C Timed Text Working Group</a>. </p> -</section><section id="toc"><h2 class="introductory" aria-level="1" role="heading" id="h2_toc">Table of Contents</h2><ul class="toc" role="directory" id="respecContents"><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"><liclass="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-cue-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..1 </span>WebVTT file using metadata content</a></li><li class="tocline"><a href="#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-ules" class="tocxref"><span class="secno">5.4 </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">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><i 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="#vttcue-interface" class="tocxref"><span class="secno">7.1 </span>VTTCue interface</a></li><li class="tocline"><a href="#extension-of-the-texttrack-interface-for-region-support" class="tocxref"><span class="secno">7.2 </span>Extensin of the TextTrack interface for region support</a></li><li class="tocline"><a href="#vttregion-interface" class="tocxref"><span class="secno">7.3 </span>VTTRegion interface</a></li><li class="tocline"><a href="#vttregionlist-interface" class="tocxref"><span class="secno">7.4 </span>VTTRegionList 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><section id="toc"><h2 class="introductory" aria-level="1" role="heading" id="h2_toc">Table of Contents</h2><ul class="toc" role="directory" id="respecContents"><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"><liclass="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-cue-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..1 </span>WebVTT file using metadata content</a></li><li class="tocline"><a href="#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-ules" class="tocxref"><span class="secno">5.4 </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">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><i 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="#vttcue-interface" class="tocxref"><span class="secno">7.1 </span>VTTCue interface</a></li><li class="tocline"><a href="#vttregion-interface" class="tocxref"><span class="secno">7.2 </span>VTTRegion interface</a></li></ul></li><li cass="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> @@ -998,9 +998,9 @@ </dd> - <dt><dfn title="text track cue region identifier" id="dfn-text-track-cue-region-identifier">A region identifier</dfn></dt> + <dt><dfn title="text track cue region" id="dfn-text-track-cue-region">A region</dfn></dt> <dd> - <p>A string that references by identifier the region that a cue belongs to, if it is not null.</p> + <p>An optional <a href="#dfn-text-track-region" class="internalDFN">text track region</a> to which a cue belongs.</p> </dd> </dl> @@ -1014,7 +1014,7 @@ 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 text alignment" href="#dfn-text-track-cue-text-alignment" class="internalDFN">alignment</a>, <a title="text track region identifier" href="#dfn-text-track-region-identifier" class="internalDFN">region identifier</a>, + track cue text alignment" href="#dfn-text-track-cue-text-alignment" class="internalDFN">alignment</a>, <a title="text track cue region" href="#dfn-text-track-cue-region" class="internalDFN">region</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> @@ -2202,11 +2202,11 @@ <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-pause-on-exit-flag" class="internalDFN">text track cue pause-on-exit flag</a> be false.</p></li> + <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> be null.</p></li> + <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-writing-direction" class="internalDFN">text track cue writing direction</a> be <a title="text track cue horizontal writing direction" href="#dfn-text-track-cue-horizontal-writing-direction" class="internalDFN">horizontal</a>.</p></li> - <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> be the empty string.</p></li> - <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-snap-to-lines-flag" class="internalDFN">text track cue snap-to-lines flag</a> be true.</p></li> <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-line-position" class="internalDFN">text track cue line position</a> be @@ -2445,8 +2445,10 @@ <p>When the algorithm above requires that the user agent <dfn id="dfn-collect-webvtt-cue-timings-and-settings">Collect WebVTT cue timings and settings</dfn> from a string - <var title="">input</var> for a <a href="#dfn-text-track-cue" class="internalDFN">text track cue</a> <var title="">cue</var>, the user agent must run the following - algorithm.</p> + <var title="">input</var> using a <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of + regions</a> <var title="">regions</var> for a <a href="#dfn-text-track-cue" class="internalDFN">text track + cue</a> <var title="">cue</var>, the user agent must run the + following algorithm.</p> <ol> @@ -2491,14 +2493,17 @@ <li><p>Let <var title="">remainder</var> be the trailing substring of <var title="">input</var> starting at <var title="">position</var>.</p></li> - <li><p><a href="#dfn-parse-the-webvtt-cue-settings" class="internalDFN">Parse the WebVTT cue settings</a> given by <var title="">remainder</var> for <var title="">cue</var>.</p></li> + <li><p><a href="#dfn-parse-the-webvtt-cue-settings" class="internalDFN">Parse the WebVTT cue settings</a> from + <var title="">remainder</var> using <var title="">regions</var> for + <var title="">cue</var>.</p></li> </ol> <p>When the user agent is to <dfn id="dfn-parse-the-webvtt-cue-settings">Parse the WebVTT cue settings</dfn> - given by a string <var title="">input</var> for a <a href="#dfn-text-track-cue" class="internalDFN">text track - cue</a> <var title="">cue</var>, the user agent must run the - following steps:</p> + from a string <var title="">input</var> using a <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of + regions</a> <var title="">regions</var> for a <a href="#dfn-text-track-cue" class="internalDFN">text track cue</a> + <var title="">cue</var>, the user agent must run the following + steps:</p> <ol> @@ -2539,7 +2544,9 @@ <dd> <ol> - <li>Let <var>cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> be <var>value</var>.</li> + <li><p>Let <var>cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> be the <!-- last --> <a href="#dfn-text-track-region" class="internalDFN">text + track region</a> in <var title="">regions</var> whose <a href="#dfn-text-track-region-identifier" class="internalDFN">text track region + identifier</a> is <var>value</var>, if any, or null otherwise.</p></li> </ol> </dd> @@ -2787,15 +2794,12 @@ <li><p>If <var>cue</var>'s <a href="#dfn-text-track-cue-line-position" class="internalDFN">text track cue line position</a> is not <a href="#dfn-text-track-cue-automatic-line-position" class="internalDFN">text track cue automatic line position</a> or <var>cue</var>'s <a href="#dfn-text-track-cue-size" class="internalDFN">text track cue size</a> is not 100 or <var>cue</var>'s <a href="#dfn-text-track-cue-writing-direction" class="internalDFN">text track cue writing direction</a> - is not <a title="text track cue horizontal writing direction" href="#dfn-text-track-cue-horizontal-writing-direction" class="internalDFN">horizontal</a>, but <var>cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue - region identifier</a> is not the empty string, let <var>cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> be the - empty string.</p></li> - + is not <a title="text track cue horizontal writing direction" href="#dfn-text-track-cue-horizontal-writing-direction" class="internalDFN">horizontal</a>, let <var>cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue + region</a> be null.</p></li> </ol> - <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_28"><span>Note</span></div><p class="">Step 5 makes sure that no matter in which order the cue settings are provided, if the cue has a <a href="#dfn-text-track-cue-line-position" class="internalDFN">text track cue line position</a> or a <a href="#dfn-text-track-cue-size" class="internalDFN">text track cue size</a> setting or is <a title="text track cue vertical growing left writing direction" href="#dfn-text-track-cue-vertical-growing-left-writing-direction" class="internalDFN">text track cue vertical growing left</a> or <a title="text track cue vertical growing right writing direction" href="#dfn-text-track-cue-vertical-growing-right-writing-direction" class="internalDFN">growing right writing direction</a>, the <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> will be ignored.</p></div> - + <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_28"><span>Note</span></div><p class="">Step 5 makes sure that no matter in which order the cue settings are provided, if the cue has a <a href="#dfn-text-track-cue-line-position" class="internalDFN">text track cue line position</a> or a <a href="#dfn-text-track-cue-size" class="internalDFN">text track cue size</a> setting or is <a title="text track cue vertical growing left writing direction" href="#dfn-text-track-cue-vertical-growing-left-writing-direction" class="internalDFN">text track cue vertical growing left</a> or <a title="text track cue vertical growing right writing direction" href="#dfn-text-track-cue-vertical-growing-right-writing-direction" class="internalDFN">growing right writing direction</a>, the <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> will be ignored.</p></div> <p>When this specification says that a user agent is to <dfn id="dfn-collect-a-webvtt-timestamp">Collect a WebVTT timestamp</dfn>, the user agent must run the @@ -3882,11 +3886,10 @@ <li><p>If <var>reset</var> is false, then, for each <a href="#dfn-text-track-cue" class="internalDFN">text track cue</a> <var>cue</var> in <var>cues</var>: if <var>cue</var>'s <a href="#dfn-text-track-cue-display-state" class="internalDFN">text track cue display state</a> has a set of CSS boxes, then:</p> <ul> - <li><p>if there is a <a href="#dfn-webvtt-region" class="internalDFN">WebVTT region</a> whose <a title="WebVTT region identifier" href="#dfn-webvtt-region-identifier" class="internalDFN">region identifier</a> is identical to <var>cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a>:</p> - <p>add those boxes to that region's <var>box</var> and remove <var>cue</var> from <var>cues</var>.</p></li> - - <li><p>otherwise:</p> - <p>add those boxes to <var>output</var> and remove <var>cue</var> from <var>cues</var>.</p></li> + <li><p>If <var>cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> is not null, add those boxes to that + region's <var>box</var> and remove <var>cue</var> from <var>cues</var>.</p></li> + <li><p>Otherwise, add those boxes to <var>output</var> and remove <var>cue</var> + from <var>cues</var>.</p></li> </ul> </li> @@ -3899,7 +3902,7 @@ cue order</a>, run the following substeps:</p> <ul> - <li><p>If <var>cue</var> has an empty <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> or there is no <a href="#dfn-webvtt-region" class="internalDFN">WebVTT region</a> whose <a title="text track cue region identifier" href="#dfn-text-track-cue-region-identifier" class="internalDFN">region identifier</a> is identical to <var>cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a>, run the following substeps:</p> + <li><p>If <var>cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> is null, run the following substeps:</p> <ol> @@ -3915,9 +3918,9 @@ </ol> </li> - <li><p>Otherwise run the following substeps:</p> + <li><p>Otherwise, run the following substeps:</p> <ol> - <li><p>Let <var>region</var> be the <a href="#dfn-webvtt-region" class="internalDFN">WebVTT region</a> whose <a title="text track cue region identifier" href="#dfn-text-track-cue-region-identifier" class="internalDFN">region identifier</a> matches the <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> of <var>cue</var>.</p></li> + <li><p>Let <var>region</var> be <var>cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a>.</p></li> <li><p>If <var>region</var>'s <a href="#dfn-text-track-region-scroll" class="internalDFN">text track region scroll</a> setting is '<code>up</code>' and <var>region</var> already has one child, set <var>region</var>'s 'transition-property' to 'top' and 'transition-duration' to '0.433s'.</p></li> @@ -3931,7 +3934,7 @@ <li><p>If the <i>paragraph embedding level</i> determined in the previous step is even (the <i>paragraph direction</i> is left-to-right), let <var>direction</var> be 'ltr', otherwise, let it be 'rtl'.</p> </li> - <li><p>Let <var>offset</var> be the <a href="#dfn-text-track-cue-text-position" class="internalDFN">text track cue text position</a> multiplied by the <var>width</var> of the <a href="#dfn-webvtt-region-object" class="internalDFN">WebVTT region object</a> whose <a title="text track cue region identifier" href="#dfn-text-track-cue-region-identifier" class="internalDFN">region identifier</a> is identical to <var>cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> and divided by 100 (i.e. interpret it as a percentage of the region width).</p> + <li><p>Let <var>offset</var> be the <a href="#dfn-text-track-cue-text-position" class="internalDFN">text track cue text position</a> multiplied by <var>region</var>'s <a href="#dfn-text-track-region-width" class="internalDFN">text track region width</a> and divided by 100 (i.e. interpret it as a percentage of the region width).</p> </li> <li><p>If <var>direction</var> is 'ltr' and 'text-align' is 'start' or 'left', or if <var>direction</var> is 'rtl' and 'text-align' is 'end' or 'left', let <var>left</var> be <var>offset</var> and let <var>right</var> be 'auto'</p> @@ -4948,7 +4951,7 @@ enum <dfn id="dfn-alignsetting">AlignSetting</dfn> { "start", "middle", "end", "left", "right" }; [<a title="dom-VTTCue" href="#dfn-dom-vttcue" class="internalDFN">Constructor</a>(double startTime, double endTime, DOMString text)] interface <dfn id="dfn-vttcue">VTTCue</dfn> : <a href="#dfn-texttrackcue" class="internalDFN">TextTrackCue</a> { - attribute DOMString <a title="dom-VTTCue-regionId" href="#dfn-dom-vttcue-regionid" class="internalDFN">regionId</a>; + attribute <a href="#dfn-vttregion" class="internalDFN">VTTRegion</a>? <a title="dom-VTTCue-region" href="#dfn-dom-vttcue-region" class="internalDFN">region</a>; attribute <a href="#dfn-directionsetting" class="internalDFN">DirectionSetting</a> <a title="dom-VTTCue-vertical" href="#dfn-dom-vttcue-vertical" class="internalDFN">vertical</a>; attribute boolean <a title="dom-VTTCue-snapToLines" href="#dfn-dom-vttcue-snaptolines" class="internalDFN">snapToLines</a>; attribute (double or <a href="#dfn-autokeyword" class="internalDFN">AutoKeyword</a>) <a title="dom-VTTCue-line" href="#dfn-dom-vttcue-line" class="internalDFN">line</a>; @@ -4971,9 +4974,9 @@ <p>The <var title="">text</var> argument sets the <a href="#dfn-text-track-cue-text" class="internalDFN">text track cue text</a>.</p> </dd> - <dt><var title="">cue</var> . <a title="dom-VTTCue-regionId" href="#dfn-dom-vttcue-regionid" class="internalDFN">regionId</a></dt> + <dt><var title="">cue</var> . <a title="dom-VTTCue-region" href="#dfn-dom-vttcue-region" class="internalDFN">region</a></dt> <dd> - <p>Returns a string representing the <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> of the text track region that the <a href="#dfn-vttcue" class="internalDFN">VTTCue</a> object belongs to. If the <a href="#dfn-vttcue" class="internalDFN">VTTCue</a> doesn't belong to a text track region, returns the empty string.</p> + <p>Returns the <code>VTTRegion</code> object to which this cue belongs, if any, or null otherwise.</p> <p>Can be set.</p> </dd> @@ -5097,19 +5100,15 @@ <!-- default settings --> - <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> - be the empty string.</p></li> - <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-identifier" class="internalDFN">text track cue identifier</a> be the empty string.</p></li> <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-pause-on-exit-flag" class="internalDFN">text track cue pause-on-exit flag</a> be false.</p></li> + <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> be null.</p></li> + <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-writing-direction" class="internalDFN">text track cue writing direction</a> be <a title="text track cue horizontal writing direction" href="#dfn-text-track-cue-horizontal-writing-direction" class="internalDFN">horizontal</a>.</p></li> - <li><p>Let <var title="">cue</var>'s <a title="text track cue region identifier" href="#dfn-text-track-cue-region-identifier" class="internalDFN">region identifier</a> - be the empty string.</p></li> - <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-snap-to-lines-flag" class="internalDFN">text track cue snap-to-lines flag</a> be true.</p></li> <li><p>Let <var title="">cue</var>'s <a href="#dfn-text-track-cue-line-position" class="internalDFN">text track cue line position</a> be @@ -5132,11 +5131,10 @@ </ol> - <p>The <dfn title="dom-VTTCue-regionId" id="dfn-dom-vttcue-regionid"><code>regionId</code></dfn> - attribute, on getting, must return the <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> of the <a href="#dfn-text-track-cue" class="internalDFN">text - track cue</a> that the <code>VTTCue</code> object represents; or the empty string otherwise. - On setting, the <a href="#dfn-text-track-cue-region-identifier" class="internalDFN">text track cue region identifier</a> must be set to the new value if that - value refers to a <a href="#dfn-webvtt-region" class="internalDFN">WebVTT region</a>, or unset otherwise.</p> + <p>The <dfn title="dom-VTTCue-region" id="dfn-dom-vttcue-region"><code>region</code></dfn> attribute, on getting, must return + the <code>VTTRegion</code> object representing the <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> of the <a href="#dfn-text-track-cue" class="internalDFN">text + track cue</a> that the <code>VTTCue</code> object represents, if any; or null otherwise. On + setting, the <a href="#dfn-text-track-cue-region" class="internalDFN">text track cue region</a> must be set to the new value.</p> <p>The <dfn title="dom-VTTCue-vertical" id="dfn-dom-vttcue-vertical"><code>vertical</code></dfn> attribute, on getting, must return the string from the second cell @@ -5258,68 +5256,14 @@ </section> - <section id="extension-of-the-texttrack-interface-for-region-support"> - <h3 aria-level="2" role="heading" id="h3_extension-of-the-texttrack-interface-for-region-support"><span class="secno">7.2 </span>Extension of the TextTrack interface for region support</h3> - - <p>The following attribute and methods are introduced into the <a href="#dfn-texttrack" class="internalDFN">TextTrack</a> object:</p> - - <pre class="idl_whatwg">partial interface <a href="#dfn-texttrack" class="internalDFN">TextTrack</a> { - readonly attribute <a href="#dfn-vttregionlist" class="internalDFN">VTTRegionList</a>? <a title="dom-TextTrack-regions" href="#dfn-dom-texttrack-regions" class="internalDFN">regions</a>; - void <a title="dom-TextTrack-addRegion" href="#dfn-dom-texttrack-addregion" class="internalDFN">addRegion</a>(<a href="#dfn-vttregion" class="internalDFN">VTTRegion</a> region); - void <a title="dom-TextTrack-removeRegion" href="#dfn-dom-texttrack-removeregion" class="internalDFN">removeRegion</a>(<a href="#dfn-vttregion" class="internalDFN">VTTRegion</a> region); -};</pre> - - <dl class="domintro"> - - <dt><var title="">textTrack</var> . <a title="dom-TextTrack-regions" href="#dfn-dom-texttrack-regions" class="internalDFN">regions</a></dt> - <dd> - <p>Returns the <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>, as a <code>VTTRegionList</code> object.</p> - </dd> - - <dt><var title="">textTrack</var> . <a title="dom-TextTrack-addRegion" href="#dfn-dom-texttrack-addregion" class="internalDFN">addRegion</a>(region)</dt> - <dd> - <p>Adds the given region to <var>TextTrack</var>'s <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>. If that list already contains a region with the same identifier, update that region's attributes with those of <var>region</var>.</p> - </dd> - - <dt><var title="">textTrack</var> . <a title="dom-TextTrack-removeRegion" href="#dfn-dom-texttrack-removeregion" class="internalDFN">removeRegion</a>(region)</dt> - <dd> - <p>Removes the given region from <var>TextTrack</var>'s <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</p> - </dd> - - </dl> - - <p>If the <a href="#dfn-text-track-mode" class="internalDFN">text track mode</a> of the <a href="#dfn-text-track" class="internalDFN">text track</a> that the <var>TextTrack</var> object represents is not the <a href="#dfn-text-track-disabled" class="internalDFN">text track disabled</a> mode, then the <dfn title="dom-texttrack-regions" id="dfn-dom-texttrack-regions">regions</dfn> attribute must return a live <a href="#dfn-vttregionlist" class="internalDFN">VTTRegionList</a> object that represents the <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a> of the <a href="#dfn-text-track" class="internalDFN">text track</a>. Otherwise, it must return null. When an object is returned, the same object must be returned each time.</p> - - <p>The <dfn title="dom-TextTrack-addRegion" id="dfn-dom-texttrack-addregion"><code>addRegion(<var>region</var>)</code></dfn> method of <code>TextTrack</code> objects, when invoked, must run the following steps:</p> - - <ol> - <li><p>If the given <var>region</var> is in a <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>, then remove <var>region</var> from that <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</p></li> - - <li><p>If the method's <a href="#dfn-texttrack" class="internalDFN"><code>TextTrack</code></a> object's <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a> contains a region with the same identifier as <var>region</var> replace the values of that region's <var>width</var>, <var>lines</var>, <var>anchor point</var>, <var>viewport anchor point</var> and <var>scroll</var> attributes with those of <var>region</var>.</p> - - <p>Otherwise: add <var>region</var> to the method's <code>TextTrack</code> object's <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</p></li> - </ol> - - <p>The <dfn title="dom-TextTrack-removeRegion" id="dfn-dom-texttrack-removeregion"><code>removeRegion(<var>region</var>)</code></dfn> method of <code>TextTrack</code> objects, when invoked, must run the following steps:</p> - - <ol> - <li><p>If the given <var>region</var> is not currently listed in the method's <code>TextTrack</code> object's <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>, then throw a NotFoundError exception.</p></li> - - <li><p>Otherwise: remove <var>region</var> from that <a href="#dfn-text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</p></li> - </ol> - - </section><!-- TextTrack interface --> - <section id="vttregion-interface"> - <h3 aria-level="2" role="heading" id="h3_vttregion-interface"><span class="secno">7.3 </span>VTTRegion interface</h3> + <h3 aria-level="2" role="heading" id="h3_vttregion-interface"><span class="secno">7.2 </span>VTTRegion interface</h3> <p>The following interface is used to expose WebVTT regions in the DOM API:</p> <pre class="idl_whatwg">enum <dfn id="dfn-scrollsetting">ScrollSetting</dfn> { "" /* none */, "up" }; [Constructor] interface <dfn id="dfn-vttregion">VTTRegion</dfn> { - readonly attribute TextTrack? <a title="dom-VTTRegion-track" href="#dfn-dom-vttregion-track" class="internalDFN">track</a>; - attribute DOMString <a title="dom-VTTRegion-id" href="#dfn-dom-vttregion-id" class="internalDFN">id</a>; attribute double <a title="dom-VTTRegion-width" href="#dfn-dom-vttregion-width" class="internalDFN">width</a>; attribute long <a title="dom-VTTRegion-lines" href="#dfn-dom-vttregion-lines" class="internalDFN">lines</a>; attribute double <a title="dom-VTTRegion-regionAnchorX" href="#dfn-dom-vttregion-regionanchorx" class="internalDFN">regionAnchorX</a>; @@ -5333,17 +5277,7 @@ <dt><var title="">region</var> = new <code title="dom-VTTRegion">VTTRegion</code>()</dt> <dd> - <p>Returns a new <code>VTTRegion</code> object, for use with the <code title="dom-TextTrack-addRegion">addRegion()</code> method.</p> - </dd> - - <dt><var title="">region</var> . <a title="dom-VTTRegion-track" href="#dfn-dom-vttregion-track" class="internalDFN">track</a></dt> - <dd> - <p>Returns the <var>TextTrack</var> object to which this text track region belongs, if any, or null otherwise.</p> - </dd> - - <dt><var title="">region</var> . <a title="dom-VTTRegion-id" href="#dfn-dom-vttregion-id" class="internalDFN">id</a></dt> - <dd> - <p>Returns the text track region identifier. Can be set.</p> + <p>Returns a new <code>VTTRegion</code> object.</p> </dd> <dt><var title="">region</var> . <a title="dom-VTTRegion-width" href="#dfn-dom-vttregion-width" class="internalDFN">width</a></dt> @@ -5413,10 +5347,6 @@ <li><p>Return the <code>VTTRegion</code> object representing region.</p></li> </ol> - <p>The <dfn title="dom-VTTRegion-track" id="dfn-dom-vttregion-track"><code>track</code></dfn> attribute, on getting, must return the <code>TextTrack</code> object of the <a href="#dfn-text-track" class="internalDFN">text track</a> in whose list of regions the <a href="#dfn-text-track-region" class="internalDFN">text track region</a> that the <code>VTTRegion</code> object represents finds itself, if any; or null otherwise.</p> - - <p>The <dfn title="dom-VTTRegion-id" id="dfn-dom-vttregion-id"><code>id</code></dfn> attribute, on getting, must return the <a href="#dfn-text-track-region-identifier" class="internalDFN">text track region identifier</a> of the <a href="#dfn-text-track-region" class="internalDFN">text track region</a> that the <a href="#dfn-vttregion" class="internalDFN"><code>VTTRegion</code></a> object represents. On setting, the <a href="#dfn-text-track-region-identifier" class="internalDFN">text track region identifier</a> must be set to the new value.</p> - <p>The <dfn title="dom-VTTRegion-width" id="dfn-dom-vttregion-width"><code>width</code></dfn> attribute, on getting, must return the <a href="#dfn-text-track-region-width" class="internalDFN">text track region width</a> of the <a href="#dfn-text-track-region" class="internalDFN">text track region</a> that the <code>VTTRegion</code> object represents, in percent of video width. On setting, the <a href="#dfn-text-track-region-width" class="internalDFN">text track region width</a> must be set to the new value, interpreted as a percentage.</p> <p>The <dfn title="dom-VTTRegion-lines" id="dfn-dom-vttregion-lines"><code>lines</code></dfn> attribute, on getting, must return the <a href="#dfn-text-track-region-lines" class="internalDFN">text track region lines</a> of the <a href="#dfn-text-track-region" class="internalDFN">text track region</a> that the <code>VTTRegion</code> object represents, as number of lines. On setting, the <a href="#dfn-text-track-region-lines" class="internalDFN">text track region lines</a> must be set to the new value, interpreted as a number of lines.</p> @@ -5445,47 +5375,6 @@ </section><!-- end VTTRegion object --> - <section id="vttregionlist-interface"> - <h3 aria-level="2" role="heading" id="h3_vttregionlist-interface"><span class="secno">7.4 </span>VTTRegionList interface</h3> - - <pre class="idl_whatwg">interface <dfn id="dfn-vttregionlist">VTTRegionList</dfn> { - readonly attribute unsigned long <a title="dom-VTTRegionList-length" href="#dfn-dom-vttregionlist-length" class="internalDFN">length</a>; - getter <a title="dom-VTTRegion" href="#dfn-dom-vttregion" class="internalDFN">VTTRegion</a> (unsigned long index); - <a href="#dfn-vttregion" class="internalDFN">VTTRegion</a>? <a title="dom-VTTRegionList-getRegionById" href="#dfn-dom-vttregionlist-getregionbyid" class="internalDFN">getRegionById</a>(DOMString id); -};</pre> - - <dl class="domintro"> - - <dt><var title="">regionList</var> . <a title="dom-VTTRegionList-length" href="#dfn-dom-vttregionlist-length" class="internalDFN">length</a></dt> - <dd> - <p>Returns the number of <var>regions</var> in the list.</p> - </dd> - - <dt><var title="">regionList</var>[index]</dt> - <dd> - <p>Returns the <a href="#dfn-text-track-region" class="internalDFN">text track region</a> with index <var>index</var> in the list. The regions are sorted in the order in which they were inserted.</p> - </dd> - - <dt><var title="">regionList</var> . <a title="dom-VTTRegionList-getRegionById" href="#dfn-dom-vttregionlist-getregionbyid" class="internalDFN">getRegionById</a>( id )</dt> - <dd> - <p>Returns the first <a href="#dfn-text-track-region" class="internalDFN">text track region</a> with <a href="#dfn-text-track-region-identifier" class="internalDFN">text track region identifier</a> <var>id</var>.</p> - <p>Returns null if none of the regions have the given identifier or if the argument is the empty string.</p> - </dd> - </dl> - - <p>A <code>VTTRegionList</code> object represents a dynamically updating list of <a title="text track region" href="#dfn-text-track-region" class="internalDFN">text track regions</a> in a given order.</p> - - <p>The <dfn title="dom-VTTRegionList-length" id="dfn-dom-vttregionlist-length"><code>length</code></dfn> attribute must return the number of <a title="text track region" href="#dfn-text-track-region" class="internalDFN">regions</a> in the list represented by the <code>VTTRegionList</code> object.</p> - - <p>The <a href="#dfn-supported-property-indices" class="internalDFN">supported property indices</a> of a <code>VTTRegionList</code> object at any instant are the numbers from zero to the number of <a title="text track region" href="#dfn-text-track-region" class="internalDFN">regions</a> in the list represented by the <code>VTTRegionList</code> object minus one, if any. If there are no <a title="text track region" href="#dfn-text-track-region" class="internalDFN">regions</a> in the list, there are no <a href="#dfn-supported-property-indices" class="internalDFN">supported property indices</a>.</p> - - <p>To <a href="#dfn-determine-the-value-of-an-indexed-property" class="internalDFN">determine the value of an indexed property</a> for a given index <var>index</var>, the user agent must return the <var>index</var> of the <a href="#dfn-text-track-region" class="internalDFN">text track region</a> in the list represented by the <code>VTTRegionList</code> object.</p> - - <p>The <dfn title="dom-VTTRegionList-getRegionById" id="dfn-dom-vttregionlist-getregionbyid"><code>getRegionById(<var>id</var>)</code></dfn> method, when called with an argument other than the empty string, must return the first <a href="#dfn-text-track-region" class="internalDFN">text track region</a> in the list represented by the <code>VTTRegionList</code> object whose <a href="#dfn-text-track-region-identifier" class="internalDFN">text track region identifier</a> is <var>id</var>, if any, or null otherwise. If the argument is the empty string, then the method must return null.</p> - <p> - - </p></section><!-- end VTTRegionList object --> - </section><!-- WebVTT API for browsers --> <section typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter" id="iana-considerations">
Received on Thursday, 30 January 2014 22:16:20 UTC