Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document defines a Level 1 API for exposing raw Timed Text Markup Language (TTML) content to Web applications.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is an editor's draft that has no official standing.
This document was published by the Timed Text Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-tt@w3.org (subscribe, archives). All comments are welcome.
Publication as an Editor's Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This section is non-normative.
This document defines a Level 1 API for exposing raw Timed Text Markup Language (TTML) content to Web applications. It is expected that a Level 2 API will be defined that builds upon this API in order to expose parsed Timed Text Markup Language (TTML) content to Web applications.
This section is non-normative.
This section describes common use cases for the TTML API Level 1.
Some HTML user agents do not parse or render TTML content that is embedded in a media resource and potentially exposed to Web applications as a media-resource-specific text track (i.e., in-band text track). In such cases, it is possible for a Web application to parse and render this content by making use of client-side script provided the TTML content is exposed by some well defined API.
Authors of TTML content may include a variety of arbitrary metadata that provide additional layers of information about that content. For example, the
ttp:agent
attribute may be used to specify the
agent(s) involved in the performance (production) of content (such as 'James Bond
', 'Doctor No
', etc.), and the
ttp:role
attribute may be used to
specify the role(s) of content (such as action
, dialog
, music
, etc.),
and so forth. In such cases, it is possible for a Web application to parse and utilize this metadata
by making use of client-side script provided the TTML content containing the metadata is exposed by some well defined API.
An example of utilizing this metadata would be providing a client script generated user interface to search for TTML content associated with particular agents or roles, or automatically provide links from content so marked to other Web content or explanatory material.
This specification relies upon the certain concepts and APIs defined in other specifications as follows:
SyntaxError
.
TextTrackCue
.
[HTML5]As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this specification are to be interpreted as described in [RFC2119].
An HTML user agent that claims to support any profile of [TTML1], or any subsequent version thereof, MUST implement support for the TTML Level 1 API defined herein, and, if it exposes TTML content to Web applications in any fashion, then it also MUST expose that content to Web applications using this API.
The above conformance requirement is not intended to proscribe exposing TTML content to a Web application using an alternative mechanism to that defined herein. That is, TTML content may be exposed to a Web application in multiple ways, provided one of those ways is the mechanism defined here.
Need to cite definitions of well-formed and UTF-16 encoded XML serialization.
[Constructor(double startTime, double endTime, DOMString text)]
interface RawTTMLCue : TextTrackCue {
attribute DOMString text;
};
text
of type DOMString, SyntaxError
exception.RawTTMLCue
Parameter | Type | Nullable | Optional | Description |
---|---|---|---|---|
startTime | double |
✘ | ✘ |
A TTML media time relative cue starting time, as further defined by
startTime [HTML5].
|
endTime | double |
✘ | ✘ |
A TTML media time relative cue ending time, as further defined by
endTime [HTML5].
|
text | DOMString |
✘ | ✘ | A non-empty string representing a well-formed UTF-16 encoded XML serialization of a TTML intermediate synchronic document. |
If the endTime
parameter is less than startTime
, then set the cue's end time to startTime
.
The value of the text
parameter may be an empty string, in which case the constructed cue object represents
a cue with no content.