From 398c155dbe5fc217caee3ab0ee6997184fd3d7cb Mon Sep 17 00:00:00 2001
From: Simon Pieters 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:
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; } - + +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 @@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:
v
" that requires an annotation; the annotation
@@ -3355,7 +3359,7 @@ Let percentage be the result of parsing input using the rules for parsing floating-point number values. [HTML]
If percentage is an error, is less than 0, or is greater than 100, then fail.
@@ -3474,7 +3478,7 @@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] If number is an error, then jump to the step labeled next
@@ -4068,28 +4072,28 @@ 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. 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. Let video be the media element or other playback mechanism. 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. 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. 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. 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 " 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. For the purposes of processing by the CSS specification, WebVTT Internal Node Objects are equivalent to elements with the same
@@ -4671,7 +4675,7 @@ 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] The ::cue-region pseudo-element represents a region. Similarly to all other pseudo-elements, these pseudo-elements are not directly
-present in the The :past and :future pseudo-classes can be used in ::cue(selector) to match WebVTT Internal Node Objects based on the current playback position. The applicable language for the list
- of WebVTT Node Objects can be set by the As above, the applicable language for
- the list of WebVTT Node Objects can be set by the If the matched element is not a video element, the
+ If the matched element is not a video element, the
pseudo-elements defined below won’t have any effect according to this specification. A CSS user agent that implements the text tracks model must implement the ::cue and ::cue(selector) pseudo-elements, and the :past and :future pseudo-classes. The following interface is used to expose WebVTT cues in the DOM API: Returns a new Returns a new 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. The VTTCue(startTime, endTime, text) constructor, when invoked, must run the following steps: The Create a new WebVTT cue. Let cue be that WebVTT cue. Return the The region attribute, on getting, must return the The The vertical attribute, on getting, must return the string from
+ The 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 are as follows:
Return output.
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.
data
", then the user agent must act as if the URL failed to
resolve.Right alignment
right
- overflow-wrap property must be set to break-word
video
element’s document tree.video
element’s document tree.
I like lime.</v>
srclang
attribute in HTML.srclang
attribute in HTML.
<video ...>
<track src="example-attr.vtt"
srclang="en-US" default>
@@ -4878,7 +4882,7 @@
Cyan!</lang>
srclang
attribute in
+ the list of WebVTT Node Objects can be set by the srclang
attribute in
HTML.
@@ -4943,7 +4947,7 @@ WebVTT cues that are being rendered for the matched element.
-
7.2.1. The ::cue pseudo-element
@@ -5093,14 +5097,14 @@ 8. API
8.1. The
VTTCue
interfaceenum 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 @@
VTTCue
object, for use with the addCue()
method.VTTCue
object, for use with the addCue()
method.Returns the text track cue text as a
DocumentFragment
of HTML
elements and other DOM nodes.
- VTTCue(startTime, endTime, text)
constructor, when invoked, must run the following steps:
-
VTTCue
object representing cue.VTTRegion
object representing the WebVTT cue region of the WebVTT cue that the VTTCue
object
+ 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.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: