Timed Divs HTML
This page specifies a subclass of HTML documents that is a time-aligned text format for audio-visual content. We call the format "timed divs within HTML" or TDHT. It is intended to be used only in a World Wide Web context i.e. everywhere that Web browser functionality is available. Use cases for the format are subtitles, captions, annotations and other time aligned text as listed at http://wiki.xiph.org/index.php/OggText#Categories_of_Text_Codecs .
Files in this format are to be of text/x-tdht mime type.
Files in this format should have a file extension of .tdht .
The TDHT format changes from HTML
TDHT files are time-aligned text. This means there is a time association with blocks of text and there is time-based seeking functionality on those blocks of text.
Here is an example TDHT file for subtitles:
<html> <head> <title>Desperate Housewives - Season 5, Episode 6</title> </head> <body> <div start="00:00:00,070" end="00:00:02,270"> <p>Previously on...</p> </div> <div start="00:00:02,280" end="00:00:04,270"> <p>We had an agreement to keep things casual.</p> </div> <div start="00:00:04,280" end="00:00:06,660"> <p>Susan made her feelings clear.</p> </div> <div start="00:00:06,800" end="00:00:10,100"> <p>So if I was with another woman, that wouldn't bother you? No, it wouldn't.</p> </div> </body> </html>
The following changes to HTML4.01 are made for TDHT:
1. The body element
In HTML4.01, the body element is defined as follows:
<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body --> <!ATTLIST BODY %attrs; -- %coreattrs, %i18n, %events -- onload %Script; #IMPLIED -- the document has been loaded -- onunload %Script; #IMPLIED -- the document has been removed -- >
In TDHT1.0 we restrict it to just contain a sequence of div tags:
<!ELEMENT BODY O O (DIV)+ -- document body --> <!ATTLIST BODY %attrs; -- %coreattrs, %i18n, %events -- onload %Script; #IMPLIED -- the document has been loaded -- onunload %Script; #IMPLIED -- the document has been removed -- >
The div tags in turn can contain anything that HTML div tags can contain, thus enabling a very flexible, but time-aligned text model.
2. The div element
In HTML4.01, the div element is defined as follows:
<!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ATTLIST DIV %attrs; -- %coreattrs, %i18n, %events -- >
In TDHT1.0 we extend it with start and end time attributes:
<!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ATTLIST DIV %attrs; -- %coreattrs, %i18n, %events -- start %Time; #IMPLIED -- start time end %Time; #IMPLIED -- end time >
The Time entity is defined in HTML5: http://www.whatwg.org/specs/web-apps/current-work/#valid-time-string .
Rendering in a Web Browser
A TDHT file is meant to be associated with a audio or video file and rendered in a Web browser in sync with the audio or video file.
For security reasons, the TDHT file is not rendered into an existing HTML page, but rather creates its own iframe-like new nested browsing context.