From 398c155dbe5fc217caee3ab0ee6997184fd3d7cb Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Fri, 16 Jun 2017 08:28:36 +0200 Subject: [PATCH] Add a note about the future of ruby Fixes #264. Closes #347. --- index.bs | 6 +- index.html | 250 +++++++++++++++++++++++++++-------------------------- 2 files changed, 132 insertions(+), 124 deletions(-) diff --git a/index.bs b/index.bs index 9f7cb0e..664e842 100644 --- a/index.bs +++ b/index.bs @@ -1510,6 +1510,10 @@ underlined text, and a WebVTT cue span end tag "u".

Cue positioning controls the positioning of the baseline text, not the ruby text.

+

Ruby in WebVTT is a subset of the ruby features in HTML. This might be extended in +the future to also support an object for ruby base text as well as complex ruby, when these features +are more mature in HTML and CSS. [[HTML]] [[CSS3-RUBY]]

+

A WebVTT cue voice span consists of the following components, in the order given:

    @@ -4540,7 +4544,7 @@ corresponding cue's WebVTT cue text alignment:

    The 'font' shorthand property on the (root) list of WebVTT Node Objects must be set to -''5vh sans-serif''. [[!CSS3-RUBY]] [[!CSS-VALUES]]

    +''5vh sans-serif''. [[!CSS-VALUES]]

    The 'color' property on the (root) list of WebVTT Node Objects must be set to ''rgba(255,255,255,1)''. [[!CSS3-COLOR]]

    diff --git a/index.html b/index.html index c18f436..e1937c8 100644 --- a/index.html +++ b/index.html @@ -1186,7 +1186,8 @@ background-repeat: no-repeat; } - + +
    -

    +

    WebVTT: The Web Video Text Tracks Format

    -

    Draft Community Group Report,

    +

    Draft Community Group Report,

    This version: @@ -1472,8 +1473,8 @@

    -

    Abstract

    +

    Abstract

    This specification defines WebVTT, the Web Video Text Tracks format. Its main use is for marking up external text track resources in connection with the HTML <track> element. WebVTT files provide captions or subtitles for video content, and also text video descriptions [MAUR], chapters for content navigation, and more generally any form of metadata that is time-aligned with audio or video content.

    @@ -1761,7 +1762,7 @@

    1.3. Styling

    This section is non-normative.

    -

    CSS style sheets that apply to an HTML page that contains a video element can target WebVTT cues and regions in the video using the ::cue, ::cue() and ::cue-region pseudo-elements.

    +

    CSS style sheets that apply to an HTML page that contains a video element can target WebVTT cues and regions in the video using the ::cue, ::cue() and ::cue-region pseudo-elements.

    In this example, an HTML page has a CSS style sheet in a style element @@ -2575,6 +2576,9 @@

    Cue positioning controls the positioning of the baseline text, not the ruby text.

    +

    Ruby in WebVTT is a subset of the ruby features in HTML. This might be extended in +the future to also support an object for ruby base text as well as complex ruby, when these features +are more mature in HTML and CSS. [HTML] [CSS3-RUBY]

    A WebVTT cue voice span consists of the following components, in the order given:

    1. A WebVTT cue span start tag "v" that requires an annotation; the annotation @@ -3355,7 +3359,7 @@

      rules for parsing +

      Let percentage be the result of parsing input using the rules for parsing floating-point number values. [HTML]

    2. If percentage is an error, is less than 0, or is greater than 100, then fail.

      @@ -3474,7 +3478,7 @@

      ASCII digit, or if the U+002E DOT character (.) is the first or the last character, then jump to the step labeled next setting.

    3. -

      Let number be the result of parsing linepos using the rules for parsing +

      Let number be the result of parsing linepos using the rules for parsing floating-point number values. [HTML]

    4. If number is an error, then jump to the step labeled next @@ -4068,28 +4072,28 @@

      DocumentFragment node. WebVTT Class Object - HTML span element. + HTML span element. WebVTT Italic Object - HTML i element. + HTML i element. WebVTT Bold Object - HTML b element. + HTML b element. WebVTT Underline Object - HTML u element. + HTML u element. WebVTT Ruby Object - HTML ruby element. + HTML ruby element. WebVTT Ruby Text Object - HTML rt element. + HTML rt element. WebVTT Voice Object - HTML span element with a title attribute set to the WebVTT Voice Object’s value. + HTML span element with a title attribute set to the WebVTT Voice Object’s value. WebVTT Language Object - HTML span element with a lang attribute set to the WebVTT Language Object’s applicable language. + HTML span element with a lang attribute set to the WebVTT Language Object’s applicable language. WebVTT Text Object Text node whose data is the value of the WebVTT Text @@ -4128,7 +4132,7 @@

      6. WebVTT in media players that don’t support CSS, equivalent visual rendering will need to be implemented.

      6.1. Processing model

      -

      The rules for updating the display of WebVTT text tracks render the text tracks of a media element (specifically, a video element), or +

      The rules for updating the display of WebVTT text tracks render the text tracks of a media element (specifically, a video element), or of another playback mechanism, by applying the steps below. All the text tracks that use these rules for a given media element, or other playback mechanism, are rendered together, to avoid overlapping subtitles from multiple tracks. A fallback language language may be set when calling this algorithm.

      @@ -4140,7 +4144,7 @@

      The rules are as follows:

      1. -

        If the media element is an audio element, or is another playback +

        If the media element is an audio element, or is another playback mechanism with no rendering area, abort these steps.

      2. Let video be the media element or other playback mechanism.

        @@ -4270,7 +4274,7 @@

        Return output.

      User agents may allow the user to override the above algorithm’s positioning of cues, e.g. by -dragging them to another location on the video, or even off the video entirely.

      +dragging them to another location on the video, or even off the video entirely.

      When the algorithm above requires that the user agent apply WebVTT cue settings to obtain CSS boxes from a list of WebVTT Node Objects nodes, the user agent must run the following algorithm.

      @@ -4422,8 +4426,8 @@

      For the purpose of selectors in STYLE blocks of a WebVTT file, the style sheet must apply to a hypothetical document that contains a single empty element with no explicit name, no - namespace, no attributes, no classes, no IDs, and unknown primary language, that acts like the media element for the text tracks that were sourced from the - given WebVTT file. The selectors must not match other text tracks for the same media element. In this hypothetical document, the element must not match any + namespace, no attributes, no classes, no IDs, and unknown primary language, that acts like the media element for the text tracks that were sourced from the + given WebVTT file. The selectors must not match other text tracks for the same media element. In this hypothetical document, the element must not match any selector that would match the element itself.

      This element exists only to be the originating element for the ::cue, ::cue() and ::cue-region pseudo-elements.

      @@ -4431,7 +4435,7 @@

      For the purpose of determining the cascade of the declarations in STYLE blocks of a WebVTT file, the relative order of appearance of the style sheets must be the same order as they were added to the collection, and the order of appearance of the collection - must be after any style sheets that apply to the associated video element’s document.

      + must be after any style sheets that apply to the associated video element’s document.

      For example, given the following (invalid) HTML document:

      @@ -4454,14 +4458,14 @@

      The color:lime declaration would win, because it is last in the cascade, even though the style element is after - the video element in the document order.

      + the video element in the document order.

    5. For the purpose of resolving URLs in STYLE blocks of a WebVTT file, or any URLs in resources referenced from STYLE blocks of a WebVTT file, if the URL’s scheme is not "data", then the user agent must act as if the URL failed to resolve.

      -

      Supporting external resources with @import or background-image would be a new ability for media elements and track elements to issue network requests as the user watches the video, which could be a privacy +

      Supporting external resources with @import or background-image would be a new ability for media elements and track elements to issue network requests as the user watches the video, which could be a privacy issue.

    6. For the purposes of processing by the CSS specification, WebVTT Internal Node Objects are equivalent to elements with the same @@ -4671,7 +4675,7 @@

      Right alignment right -

      The font shorthand property on the (root) list of WebVTT Node Objects must be set to 5vh sans-serif. [CSS3-RUBY] [CSS-VALUES]

      +

      The font shorthand property on the (root) list of WebVTT Node Objects must be set to 5vh sans-serif. [CSS-VALUES]

      The color property on the (root) list of WebVTT Node Objects must be set to rgba(255,255,255,1). [CSS3-COLOR]

      The background shorthand property on the WebVTT cue background box and on WebVTT Ruby Text Objects must be set to rgba(0,0,0,0.8). [CSS3-COLOR]

      @@ -4691,7 +4695,7 @@

      overflow-wrap property must be set to break-word
    7. the font shorthand property must be set to 5vh sans-serif
    8. the color property must be set to rgba(255,255,255,1) -
    9. the overflow property must be set to hidden +
    10. the overflow property must be set to hidden
    11. the width property must be set to width
    12. the min-height property must be set to 0px
    13. the max-height property must be set to height @@ -4731,7 +4735,7 @@

      The ::cue-region pseudo-element represents a region.

      Similarly to all other pseudo-elements, these pseudo-elements are not directly -present in the video element’s document tree.

      +present in the video element’s document tree.

      The :past and :future pseudo-classes can be used in ::cue(selector) to match WebVTT Internal Node Objects based on the current playback position.

      @@ -4851,7 +4855,7 @@

      I like lime.</v>

      The applicable language for the list - of WebVTT Node Objects can be set by the srclang attribute in HTML.

      + of WebVTT Node Objects can be set by the srclang attribute in HTML.

      <video ...>
        <track src="example-attr.vtt"
               srclang="en-US" default>
      @@ -4878,7 +4882,7 @@ 

      Cyan!</lang>

      As above, the applicable language for - the list of WebVTT Node Objects can be set by the srclang attribute in + the list of WebVTT Node Objects can be set by the srclang attribute in HTML.

      @@ -4943,7 +4947,7 @@

      7.2.1. The ::cue pseudo-element

      @@ -5093,14 +5097,14 @@

      8. API

      8.1. The VTTCue interface

      The following interface is used to expose WebVTT cues in the DOM API:

      -
      enum AutoKeyword { "auto" };
      -typedef (double or AutoKeyword) LineAndPositionSetting;
      -enum DirectionSetting { "" /* horizontal */, "rl", "lr" };
      -enum LineAlignSetting { "start", "center", "end" };
      -enum PositionAlignSetting { "line-left", "center", "line-right", "auto" };
      -enum AlignSetting { "start", "center", "end", "left", "right" };
      -[Constructor(double startTime, double endTime, DOMString text)]
      -interface VTTCue : TextTrackCue {
      +
      enum AutoKeyword { "auto" };
      +typedef (double or AutoKeyword) LineAndPositionSetting;
      +enum DirectionSetting { "" /* horizontal */, "rl", "lr" };
      +enum LineAlignSetting { "start", "center", "end" };
      +enum PositionAlignSetting { "line-left", "center", "line-right", "auto" };
      +enum AlignSetting { "start", "center", "end", "left", "right" };
      +[Constructor(double startTime, double endTime, DOMString text)]
      +interface VTTCue : TextTrackCue {
         attribute VTTRegion? region;
         attribute DirectionSetting vertical;
         attribute boolean snapToLines;
      @@ -5117,7 +5121,7 @@ 

      cue = new VTTCue( startTime, endTime, text )
      -

      Returns a new VTTCue object, for use with the addCue() method.

      +

      Returns a new VTTCue object, for use with the addCue() method.

      The startTime argument sets the text track cue start time.

      The endTime argument sets the text track cue end time.

      The text argument sets the text track cue text.

      @@ -5221,7 +5225,7 @@

      Returns the text track cue text as a DocumentFragment of HTML elements and other DOM nodes.

      -

      The VTTCue(startTime, endTime, text) constructor, when invoked, must run the following steps:

      +

      The VTTCue(startTime, endTime, text) constructor, when invoked, must run the following steps:

      1. Create a new WebVTT cue. Let cue be that WebVTT cue.

        @@ -5260,10 +5264,10 @@

        Return the VTTCue object representing cue.

      -

      The region attribute, on getting, must return the VTTRegion object representing the WebVTT cue region of the WebVTT cue that the VTTCue object +

      The region attribute, on getting, must return the VTTRegion object representing the WebVTT cue region of the WebVTT cue that the VTTCue object represents, if any; or null otherwise. On setting, the WebVTT cue region must be set to the new value.

      -

      The vertical attribute, on getting, must return the string from +

      The vertical attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the WebVTT cue writing direction of the WebVTT cue that the VTTCue object represents:

      @@ -5285,16 +5289,16 @@

      On setting, the WebVTT cue writing direction must be set to the value given in the first cell of the row in the table above whose second cell is a case-sensitive match for the new value.

      -

      The snapToLines attribute, on getting, must return true if the WebVTT cue snap-to-lines flag of the WebVTT cue that the VTTCue object represents +

      The snapToLines attribute, on getting, must return true if the WebVTT cue snap-to-lines flag of the WebVTT cue that the VTTCue object represents is true; or false otherwise. On setting, the WebVTT cue snap-to-lines flag must be set to the new value.

      -

      The line attribute, on getting, must return the WebVTT cue +

      The line attribute, on getting, must return the WebVTT cue line of the WebVTT cue that the VTTCue object represents. The special value auto must be represented as the string "auto". On setting, the WebVTT cue line must be set to the new value; if the new value is the string "auto", then it must be interpreted as the special value auto.

      In order to be able to set the snapToLines and line attributes in any order, the API does not reject setting snapToLines to false when line has a value outside the range 0..100, or vice versa.

      -

      The lineAlign attribute, on getting, must return the string from +

      The lineAlign attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the WebVTT cue line alignment of the WebVTT cue that the VTTCue object represents:

      @@ -5316,12 +5320,12 @@

      On setting, the WebVTT cue line alignment must be set to the value given in the first cell of the row in the table above whose second cell is a case-sensitive match for the new value.

      -

      The position attribute, on getting, must return the WebVTT cue +

      The position attribute, on getting, must return the WebVTT cue position of the WebVTT cue that the VTTCue object represents. The special value auto must be represented as the string "auto". On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT cue position must be set to the new value; if the new value is the string "auto", then it must be interpreted as the special value auto.

      -

      The positionAlign attribute, on getting, must return the string +

      The positionAlign attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the WebVTT cue position alignment of the WebVTT cue that the VTTCue object represents:

      @@ -5346,11 +5350,11 @@

      On setting, the WebVTT cue position alignment must be set to the value given in the first cell of the row in the table above whose second cell is a case-sensitive match for the new value.

      -

      The size attribute, on getting, must return the WebVTT cue +

      The size attribute, on getting, must return the WebVTT cue size of the WebVTT cue that the VTTCue object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT cue size must be set to the new value.

      -

      The align attribute, on getting, must return the string from the +

      The align attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the WebVTT cue text alignment of the WebVTT cue that the VTTCue object represents:

      @@ -5377,19 +5381,19 @@

      On setting, the WebVTT cue text alignment must be set to the value given in the first cell of the row in the table above whose second cell is a case-sensitive match for the new value.

      -

      The text attribute, on getting, must return the raw text track +

      The text attribute, on getting, must return the raw text track cue text of the WebVTT cue that the VTTCue object represents. On setting, the text track cue text must be set to the new value.

      -

      The getCueAsHTML() method must convert the text track cue +

      The getCueAsHTML() method must convert the text track cue text to a DocumentFragment for the responsible document specified by the entry settings object by applying the WebVTT cue text DOM construction rules to the result of applying the WebVTT cue text parsing rules to the text track cue text.

      A fallback language is not provided for getCueAsHTML() since a DocumentFragment cannot expose language information.

      8.2. The VTTRegion interface

      The following interface is used to expose WebVTT regions in the DOM API:

      -
      enum ScrollSetting { "" /* none */, "up" };
      +
      enum ScrollSetting { "" /* none */, "up" };
       [Constructor]
      -interface VTTRegion {
      +interface VTTRegion {
         attribute double width;
         attribute long lines;
         attribute double regionAnchorX;
      @@ -5438,7 +5442,7 @@ 

      Can be set.

      -

      The VTTRegion() constructor, when invoked, must run the +

      The VTTRegion() constructor, when invoked, must run the following steps:

      1. @@ -5464,24 +5468,24 @@

        Return the VTTRegion object representing region.

      -

      The width attribute, on getting, must return the WebVTT +

      The width attribute, on getting, must return the WebVTT region width of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region width must be set to the new value.

      -

      The lines attribute, on getting, must return the WebVTT +

      The lines attribute, on getting, must return the WebVTT region lines of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region lines must be set to the new value.

      -

      The regionAnchorX attribute, on getting, must return the WebVTT region anchor X offset of the WebVTT region that the VTTRegion object +

      The regionAnchorX attribute, on getting, must return the WebVTT region anchor X offset of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region anchor X distance must be set to the new value.

      -

      The regionAnchorY attribute, on getting, must return the WebVTT region anchor Y offset of the WebVTT region that the VTTRegion object +

      The regionAnchorY attribute, on getting, must return the WebVTT region anchor Y offset of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region anchor Y distance must be set to the new value.

      -

      The viewportAnchorX attribute, on getting, must return the WebVTT region viewport anchor X offset of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region viewport anchor X +

      The viewportAnchorX attribute, on getting, must return the WebVTT region viewport anchor X offset of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region viewport anchor X distance must be set to the new value.

      -

      The viewportAnchorY attribute, on getting, must return the WebVTT region viewport anchor Y offset of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region viewport anchor Y +

      The viewportAnchorY attribute, on getting, must return the WebVTT region viewport anchor Y offset of the WebVTT region that the VTTRegion object represents. On setting, if the new value is negative or greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the WebVTT region viewport anchor Y distance must be set to the new value.

      -

      The scroll attribute, on getting, must return the string from +

      The scroll attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the WebVTT region scroll setting of the WebVTT region that the VTTRegion object represents:

      @@ -5596,7 +5600,7 @@

      Script resource consumption.

      Privacy of preference

      A user agent that selects, and causes to download or interpret a WebVTT file, might indicate to -the origin server that the user has a need for captions or subtitles, and also the language preference of the user for +the origin server that the user has a need for captions or subtitles, and also the language preference of the user for captions or subtitles. That is a (small) piece of information about the user. However, the offering of a caption file, and the choice whether to retrieve and consume it, are really characteristics of the format or protocol which does the offer (e.g. the HTML element), rather than of the caption @@ -5940,10 +5944,10 @@

      italic
    14. - [css-overflow-4] defines the following terms: + [css-overflow-3] defines the following terms:
    15. [css-position-3] defines the following terms: @@ -5960,14 +5964,6 @@

      ::after
    16. ::before -
    17. - [CSS3-RUBY] defines the following terms: -
    18. [CSS-SYNTAX-3] defines the following terms: +
    19. + [CSS3-RUBY] defines the following terms: +
    20. [CSSOM] defines the following terms: