Accessibility/Video Text Format: Difference between revisions

added rendering section
(moving to dot in time spec)
(added rendering section)
Line 70: Line 70:




=== WMML Specification ===
=== The elements of WMML ===


==== The elements of WMML ====
==== the <wmml> element ====
 
===== the <wmml> element =====


* is the root element of WMML
* is the root element of WMML
Line 91: Line 89:
</pre>
</pre>


===== the &lt;head> element =====
==== the &lt;head> element ====


* same definition as [http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-head-element-0 HTML &lt;head> element]
* same definition as [http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-head-element-0 HTML &lt;head> element]
Line 98: Line 96:
* &lt;style> can be used to put styling information directly in the document
* &lt;style> can be used to put styling information directly in the document


===== the &lt;cuelist> element =====
==== the &lt;cuelist> element ====


* only contains a sequence of &lt;cue> elements
* only contains a sequence of &lt;cue> elements
Line 113: Line 111:
</pre>
</pre>


===== the &lt;cue> element =====
==== the &lt;cue> element ====


* is analogous to the [http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-div-element HTML &lt;div> element] and supports all of the attributes and content elements of &lt;div>, in particular all [http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html#flow-content flow content]
* is analogous to the [http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-div-element HTML &lt;div> element] and supports all of the attributes and content elements of &lt;div>, in particular all [http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html#flow-content flow content]
Line 135: Line 133:




==== Matching WMML elements using selectors ====
=== Matching WMML elements using selectors ===


For all formatting purposes in WMML, CSS is used.
For all formatting purposes in WMML, CSS is used.
Line 147: Line 145:


With the use of attributes, CSS selectors can be applied e.g. to all cues that belong to a certain speaker, like this: cue[voice="speaker1"] { ... } .
With the use of attributes, CSS selectors can be applied e.g. to all cues that belong to a certain speaker, like this: cue[voice="speaker1"] { ... } .
=== Rendering ===
The WMML file's &lt;cue> elements are not rendered into an existing HTML page, but rather a WMML file creates its own iframe-like new nested browsing context. It is linked to the parent HTML page through a [http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-track-element track element] that is inserted as a child of the video element. Creation of a nested browsing context is important because a WMML file can come from a different URI than the Web page and thus for security reasons and for general base URI computations a nested browsing context is the better approach with the DOM nodes of the hosting page and the DOM nodes of the WMML document in different owner documents. That way, the hosting document has the security origin of its own URL and the WMML document has the security origin of its URL.
As the browser plays the video, it must render the WMML &lt;cue> tags in sync. As the start time of a <cue> tag is reached, the <cue> tag is made activate, and it is made inactive as the <cue> tag's end time is reached. If no start time is given, the start is assumed to be 0, and if no end time is given, end is assumed to be infinity.


=== Differences to other proposed formats for use in HTML5 ===
=== Differences to other proposed formats for use in HTML5 ===