[xiph-commits] r4064 - in itext: . elephants_dream elephants_dream/oggkate

silvia at svn.annodex.net silvia at svn.annodex.net
Wed Nov 25 16:41:41 PST 2009


Author: silvia
Date: 2009-11-25 16:41:41 -0800 (Wed, 25 Nov 2009)
New Revision: 4064

Added:
   itext/elephants_dream/oggkate/
   itext/elephants_dream/oggkate/kate_encode.sh
   itext/specification_v1.txt
   itext/specification_v2.txt
Removed:
   itext/elephants_dream/kate_encode.sh
   itext/specification.txt
Log:
Added the version2 specification - preparing for next.


Deleted: itext/elephants_dream/kate_encode.sh
===================================================================
--- itext/elephants_dream/kate_encode.sh	2009-11-16 10:12:55 UTC (rev 4063)
+++ itext/elephants_dream/kate_encode.sh	2009-11-26 00:41:41 UTC (rev 4064)
@@ -1,78 +0,0 @@
-#!/bin/bash
-
-# Transcode all srt files that are not in UTF-8 first
-# kateenc will not accept anything but UTF-8
-iconv -f ISO-8859-1 -t UTF-8 elephant.afrikaans.srt > elephant.afrikaans-utf8.srt
-iconv -f WINDOWS-1256 -t UTF-8 elephant.arabic.srt > elephant.arabic-utf8.srt
-cp elephant.bangla.srt elephant.bangla-utf8.srt
-iconv -f WINDOWS-1252 -t UTF-8 elephant.breton.srt > elephant.breton-utf8.srt
-iconv -f WINDOWS-1251 -t UTF-8 elephant.bulgarian.srt > elephant.bulgarian-utf8.srt
-cp elephant.catalan-utf8.srt elephant.catalan.srt
-iconv -f GB18030 -t UTF-8 elephant.chinese.srt > elephant.chinese-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.czech.srt > elephant.czech-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.danish.srt > elephant.danish-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.dutch.srt > elephant.dutch-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.english.srt > elephant.english-utf8.srt
-iconv -f WINDOWS-1252 -t UTF-8 elephant.estonian.srt > elephant.estonian-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.finnish.srt > elephant.finnish-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.french.srt > elephant.french-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.german.srt > elephant.german-utf8.srt
-iconv -f ISO-8859-7 -t UTF-8 elephant.greek.srt > elephant.greek-utf8.srt
-iconv -f WINDOWS-1252 -t UTF-8 elephant.hebrew.srt > elephant.hebrew-utf8.srt
-cp elephant.hungarian-utf8.srt elephant.hungarian.srt
-cp elephant.italian.srt elephant.italian-utf8.srt
-cp elephant.japanese.srt elephant.japanese-utf8.srt
-iconv -f EUC-JP -t UTF-8 elephant.japanese-euc.srt > elephant.japanese_euc-utf8.srt
-cp elephant.maltese_utf8.srt elephant.maltese-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.norwegian.srt > elephant.norwegian-utf8.srt
-cp elephant.polish.srt elephant.polish-utf8.srt
-cp elephant.portuguese.srt elephant.portuguese-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.brazilian.srt > elephant.brazilian-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.romanian.srt > elephant.romanian-utf8.srt
-iconv -f WINDOWS-1251 -t UTF-8 elephant.russian.srt > elephant.russian-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.slovenian.srt > elephant.slovenian-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.spanish.srt > elephant.spanish-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.spanish-us.srt > elephant.spanish_us-utf8.srt
-iconv -f WINDOWS-1251 -t UTF-8 elephant.slovak.srt > elephant.slovak-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 elephant.swedish.srt > elephant.swedish-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 audiodescription.srt > audiodescription-utf8.srt
-iconv -f ISO-8859-1 -t UTF-8 chapters.srt > chapters-utf8.srt
-
-# Encode into Ogg files with kate-only track
-kateenc -t srt -l af -c SUB -o elephant.afrikaans.ogx elephant.afrikaans-utf8.srt
-kateenc -t srt -l ar -c SUB -o elephant.arabic.ogx elephant.arabic-utf8.srt
-kateenc -t srt -l bn -c SUB -o elephant.bangla.ogx elephant.bangla-utf8.srt
-kateenc -t srt -l br -c SUB -o elephant.breton.ogx elephant.breton-utf8.srt
-kateenc -t srt -l bg -c SUB -o elephant.bulgarian.ogx elephant.bulgarian-utf8.srt
-kateenc -t srt -l ca -c SUB -o elephant.catalan.ogx elephant.catalan-utf8.srt
-kateenc -t srt -l zh -c SUB -o elephant.chinese.ogx elephant.chinese-utf8.srt
-kateenc -t srt -l cs -c SUB -o elephant.czech.ogx elephant.czech-utf8.srt
-kateenc -t srt -l da -c SUB -o elephant.danish.ogx elephant.danish-utf8.srt
-kateenc -t srt -l nl -c SUB -o elephant.dutch.ogx elephant.dutch-utf8.srt
-kateenc -t srt -l en -c SUB -o elephant.english.ogx elephant.english-utf8.srt
-kateenc -t srt -l et -c SUB -o elephant.estonian.ogx elephant.estonian-utf8.srt
-kateenc -t srt -l fi -c SUB -o elephant.finnish.ogx elephant.finnish-utf8.srt
-kateenc -t srt -l fr -c SUB -o elephant.french.ogx elephant.french-utf8.srt
-kateenc -t srt -l de -c SUB -o elephant.german.ogx elephant.german-utf8.srt
-kateenc -t srt -l el -c SUB -o elephant.greek.ogx elephant.greek-utf8.srt
-kateenc -t srt -l he -c SUB -o elephant.hebrew.ogx elephant.hebrew-utf8.srt
-kateenc -t srt -l hu -c SUB -o elephant.hungarian.ogx elephant.hungarian-utf8.srt
-kateenc -t srt -l it -c SUB -o elephant.italian.ogx elephant.italian-utf8.srt
-kateenc -t srt -l ja -c SUB -o elephant.japanese.ogx elephant.japanese-utf8.srt
-kateenc -t srt -l mt -c SUB -o elephant.maltese.ogx elephant.maltese-utf8.srt
-kateenc -t srt -l nn -c SUB -o elephant.norwegian.ogx elephant.norwegian-utf8.srt
-kateenc -t srt -l pl -c SUB -o elephant.polish.ogx elephant.polish-utf8.srt
-kateenc -t srt -l pt -c SUB -o elephant.portuguese.ogx elephant.portuguese-utf8.srt
-kateenc -t srt -l pt-br -c SUB -o elephant.brazilian.ogx elephant.brazilian-utf8.srt
-kateenc -t srt -l ro -c SUB -o elephant.romanian.ogx elephant.romanian-utf8.srt
-kateenc -t srt -l ru -c SUB -o elephant.russian.ogx elephant.russian-utf8.srt
-kateenc -t srt -l sl -c SUB -o elephant.slovenian.ogx elephant.slovenian-utf8.srt
-kateenc -t srt -l es -c SUB -o elephant.spanish.ogx elephant.spanish-utf8.srt
-kateenc -t srt -l es-mx -c SUB -o elephant.spanish-us.ogx elephant.spanish_us-utf8.srt
-kateenc -t srt -l sk -c SUB -o elephant.slovak.ogx elephant.slovak-utf8.srt
-kateenc -t srt -l sv -c SUB -o elephant.swedish.ogx elephant.swedish-utf8.srt
-kateenc -t srt -l en -c SUB -o audiodescription.ogx audiodescription-utf8.srt
-kateenc -t srt -l en -c SUB -o chapters.ogx chapters-utf8.srt
-
-# Merge Ogg files together with kate-tracks
-oggz-merge -o elephant.mt-eng.ogv elephant.english.ogx elephant.multitrack.ogv

Added: itext/elephants_dream/oggkate/kate_encode.sh
===================================================================
--- itext/elephants_dream/oggkate/kate_encode.sh	                        (rev 0)
+++ itext/elephants_dream/oggkate/kate_encode.sh	2009-11-26 00:41:41 UTC (rev 4064)
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+# Transcode all srt files that are not in UTF-8 first
+# kateenc will not accept anything but UTF-8
+iconv -f ISO-8859-1 -t UTF-8 elephant.afrikaans.srt > elephant.afrikaans-utf8.srt
+iconv -f WINDOWS-1256 -t UTF-8 elephant.arabic.srt > elephant.arabic-utf8.srt
+cp elephant.bangla.srt elephant.bangla-utf8.srt
+iconv -f WINDOWS-1252 -t UTF-8 elephant.breton.srt > elephant.breton-utf8.srt
+iconv -f WINDOWS-1251 -t UTF-8 elephant.bulgarian.srt > elephant.bulgarian-utf8.srt
+cp elephant.catalan-utf8.srt elephant.catalan.srt
+iconv -f GB18030 -t UTF-8 elephant.chinese.srt > elephant.chinese-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.czech.srt > elephant.czech-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.danish.srt > elephant.danish-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.dutch.srt > elephant.dutch-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.english.srt > elephant.english-utf8.srt
+iconv -f WINDOWS-1252 -t UTF-8 elephant.estonian.srt > elephant.estonian-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.finnish.srt > elephant.finnish-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.french.srt > elephant.french-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.german.srt > elephant.german-utf8.srt
+iconv -f ISO-8859-7 -t UTF-8 elephant.greek.srt > elephant.greek-utf8.srt
+iconv -f WINDOWS-1252 -t UTF-8 elephant.hebrew.srt > elephant.hebrew-utf8.srt
+cp elephant.hungarian-utf8.srt elephant.hungarian.srt
+cp elephant.italian.srt elephant.italian-utf8.srt
+cp elephant.japanese.srt elephant.japanese-utf8.srt
+iconv -f EUC-JP -t UTF-8 elephant.japanese-euc.srt > elephant.japanese_euc-utf8.srt
+cp elephant.maltese_utf8.srt elephant.maltese-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.norwegian.srt > elephant.norwegian-utf8.srt
+cp elephant.polish.srt elephant.polish-utf8.srt
+cp elephant.portuguese.srt elephant.portuguese-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.brazilian.srt > elephant.brazilian-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.romanian.srt > elephant.romanian-utf8.srt
+iconv -f WINDOWS-1251 -t UTF-8 elephant.russian.srt > elephant.russian-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.slovenian.srt > elephant.slovenian-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.spanish.srt > elephant.spanish-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.spanish-us.srt > elephant.spanish_us-utf8.srt
+iconv -f WINDOWS-1251 -t UTF-8 elephant.slovak.srt > elephant.slovak-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 elephant.swedish.srt > elephant.swedish-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 audiodescription.srt > audiodescription-utf8.srt
+iconv -f ISO-8859-1 -t UTF-8 chapters.srt > chapters-utf8.srt
+
+# Encode into Ogg files with kate-only track
+kateenc -t srt -l af -c SUB -o elephant.afrikaans.ogx elephant.afrikaans-utf8.srt
+kateenc -t srt -l ar -c SUB -o elephant.arabic.ogx elephant.arabic-utf8.srt
+kateenc -t srt -l bn -c SUB -o elephant.bangla.ogx elephant.bangla-utf8.srt
+kateenc -t srt -l br -c SUB -o elephant.breton.ogx elephant.breton-utf8.srt
+kateenc -t srt -l bg -c SUB -o elephant.bulgarian.ogx elephant.bulgarian-utf8.srt
+kateenc -t srt -l ca -c SUB -o elephant.catalan.ogx elephant.catalan-utf8.srt
+kateenc -t srt -l zh -c SUB -o elephant.chinese.ogx elephant.chinese-utf8.srt
+kateenc -t srt -l cs -c SUB -o elephant.czech.ogx elephant.czech-utf8.srt
+kateenc -t srt -l da -c SUB -o elephant.danish.ogx elephant.danish-utf8.srt
+kateenc -t srt -l nl -c SUB -o elephant.dutch.ogx elephant.dutch-utf8.srt
+kateenc -t srt -l en -c SUB -o elephant.english.ogx elephant.english-utf8.srt
+kateenc -t srt -l et -c SUB -o elephant.estonian.ogx elephant.estonian-utf8.srt
+kateenc -t srt -l fi -c SUB -o elephant.finnish.ogx elephant.finnish-utf8.srt
+kateenc -t srt -l fr -c SUB -o elephant.french.ogx elephant.french-utf8.srt
+kateenc -t srt -l de -c SUB -o elephant.german.ogx elephant.german-utf8.srt
+kateenc -t srt -l el -c SUB -o elephant.greek.ogx elephant.greek-utf8.srt
+kateenc -t srt -l he -c SUB -o elephant.hebrew.ogx elephant.hebrew-utf8.srt
+kateenc -t srt -l hu -c SUB -o elephant.hungarian.ogx elephant.hungarian-utf8.srt
+kateenc -t srt -l it -c SUB -o elephant.italian.ogx elephant.italian-utf8.srt
+kateenc -t srt -l ja -c SUB -o elephant.japanese.ogx elephant.japanese-utf8.srt
+kateenc -t srt -l mt -c SUB -o elephant.maltese.ogx elephant.maltese-utf8.srt
+kateenc -t srt -l nn -c SUB -o elephant.norwegian.ogx elephant.norwegian-utf8.srt
+kateenc -t srt -l pl -c SUB -o elephant.polish.ogx elephant.polish-utf8.srt
+kateenc -t srt -l pt -c SUB -o elephant.portuguese.ogx elephant.portuguese-utf8.srt
+kateenc -t srt -l pt-br -c SUB -o elephant.brazilian.ogx elephant.brazilian-utf8.srt
+kateenc -t srt -l ro -c SUB -o elephant.romanian.ogx elephant.romanian-utf8.srt
+kateenc -t srt -l ru -c SUB -o elephant.russian.ogx elephant.russian-utf8.srt
+kateenc -t srt -l sl -c SUB -o elephant.slovenian.ogx elephant.slovenian-utf8.srt
+kateenc -t srt -l es -c SUB -o elephant.spanish.ogx elephant.spanish-utf8.srt
+kateenc -t srt -l es-mx -c SUB -o elephant.spanish-us.ogx elephant.spanish_us-utf8.srt
+kateenc -t srt -l sk -c SUB -o elephant.slovak.ogx elephant.slovak-utf8.srt
+kateenc -t srt -l sv -c SUB -o elephant.swedish.ogx elephant.swedish-utf8.srt
+kateenc -t srt -l en -c SUB -o audiodescription.ogx audiodescription-utf8.srt
+kateenc -t srt -l en -c SUB -o chapters.ogx chapters-utf8.srt
+
+# Merge Ogg files together with kate-tracks
+oggz-merge -o elephant.mt-eng.ogv elephant.english.ogx elephant.multitrack.ogv


Property changes on: itext/elephants_dream/oggkate/kate_encode.sh
___________________________________________________________________
Added: svn:executable
   + *

Deleted: itext/specification.txt
===================================================================
--- itext/specification.txt	2009-11-16 10:12:55 UTC (rev 4063)
+++ itext/specification.txt	2009-11-26 00:41:41 UTC (rev 4064)
@@ -1,145 +0,0 @@
-/*
-* This work is licensed under the Creative Commons Attribution-Share Alike 3.0
-* Unported License. To view a copy of this license, visit
-* http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
-* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
-*
-* The Initial Developer of the Original Code is Mozilla Corporation.
-* Portions created by the Initial Developer are Copyright (C) 2009
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-*  Silvia Pfeiffer <silvia at siliva-pfeiffer.de>
-*
-*/
-
-
-Specification of the itext element
-==================================
-
-The itext element
-
-Categories
-    Metadata content.
-    Flow content.
-    Phrasing content.
-
-Contexts in which this element may be used:
-    In a video or audio element that is a child of a body element.
-
-Content model:
-    Empty.
-
-Content attributes:
-    Global attributes (include id and style)
-    category
-    src
-    lang
-    type
-    charset
-    display
-
-DOM interface:
-
-    [Callable=namedItem]
-    interface HTMLItextElement : HTMLElement {
-               attribute DOMString category;
-               attribute DOMString src;
-               attribute DOMString lang;
-               attribute DOMString type;
-               attribute DOMString charset;
-               attribute boolean display;
-
-      readonly attribute boolean fetched;
-      readonly attribute boolean enabled;
-      readonly attribute ItextError error;
-      readonly attribute float delay;
-      readonly attribute HTMLCollection allText;
-      readonly attribute langName;
-
-    void fetch();
-    DOMString currentText(currentTime);
-    void enable();
-    void disable();
-    void delay(seconds);
-    };    
-
-
-The itext element allows authors to include a link to an external file that contains informative text about the video. The external resource is expected to consist of a sequence of time intervals with associated text and potentially layout, styling, and animation information for the text. The text is displayed as the parent audio or video element goes through its time interval, i.e. the parent's currentTime reaches has reached the start time of the interval but has not yet reached the end time of the interval (a semi-open interval: [start,end) ).
-
-The category attribute describes what function the informative text represents and can be one of the following:
-* CC: closed captions (for the deaf)
-* SUB: subtitles (for i18n)
-* TAD: textual audio descriptions (for the blind; to be used as braille or through TTS)
-* KTV: karaoke
-* TIK: ticker text
-* AR: active regions
-* NB: semantic annotations, including speech bubbles and director comments
-* META: metadata, mostly machine-readable
-* TRX: transcripts / scripts
-* LRC: lyrics
-* LIN: linguistic markup
-* CUE: cue points, DVD style chapter markers and similar navigational landmarks
-
-The src  attribute gives the address of the external itext resource to use. The value of the attribute must be a valid URL identifying a text resource of the type given by the type attribute, if the attribute is present, or of the type "text/srt", if the attribute is absent.
-
-NOTE: text/srt will need to be registered as a mime type
-
-The type attribute gives the format of the data, RFC 2046. If the attribute is present, its value must be a valid MIME type, optionally with parameters. The charset parameter must not be specified. (The default, which is used if the attribute is absent, is "text/srt".) [RFC2046]
-
-The lang attribute, if present, gives the language of the linked resource. The value must be a valid RFC 3066 language code. [RFC3066]  User agents will use this attribute to select between, e.g., all itext elements given for a video or audio element that belong to the same category, but represent different languages. User agents that discover upon fetching of the resource that language information associated with the resource differs from the given lang, will set an error code on the element.
-
-The charset attribute gives the character encoding of the external text resource. If the attribute is set, its value must be a valid character encoding name, must be the preferred name for that encoding, and must match the encoding given in the charset parameter of the Content-Type metadata of the external file, if any. [IANACHARSET]
-
-The display attribute enables an author to specify whether an itext element is displayed by default, not displayed by default, or automatically displayed in association with its parent audio or video element based on conditions. The values of this attribute are { yes, no, auto } and the default value is "no". A user agent that comes across an "auto" display itext element has to activate it by default if its lang setting corresponds with the browser's default language setting.
-
-
-Further itext functionality:
-
-1. Itext fetching
-
-An itext resource is not automatically fetched as the element is parsed, since there may be a sizeable number of external resources to retrieve for an individual video or audio element. It is only fetched under the following circumstances:
-
-* if the display attribute is set to "yes", or
-* if the display attribute is set to "auto" and the lang matches to browser's default language setting, or
-* if the fetch() function has been called on the itext element.
-
-Fetching an itext resource means following the src URL and retrieving the resource. Fetching the external resource must not delay the load event of the element's document. The user agent will work with the fetched itext resource as soon as it is retrieved.
-
-2. Itext display
-
-An enabled itext resource displays its content on screen.
-
-An itext resource that has been fetched because of the display attribute is enabled by default.
-
-An itext resource that has been fetched using the fetch() function is disabled.
-
-An itext resource that is currently enabled can be disabled using the disable() function.
-An itext resource that is currently disabled can be enabled using the enable() function.
-
-3. Itext delay
-
-The itext resource is synchronised to its parent audio or video element through the parent's currentTime attribute. Sometimes, synchronisation can be off.
-
-The delay(seconds) function provides a method to offset the currentTime by a positive or negative float value to fix synchronisation. The readonly delay attribute defaults to 0 and is updated through calls to the delay(seconds) function.
-
-4. Itext text extraction
-
-The currentText(currentTime) function returns the current text segment from the itext resource, i.e. the text that is active at the parent's currentTime attribute value.
-
-The allText attribute allows access to all the text segments as extracted from the itext resource.
-
-The langName attribute exposes the full language name for the itext resource, such that a javascript developer can display it in a menu.
-
-5. Itext errors
-
-The error attribute contains the last error that may have appeared in relation to the itext resource.
-
-interface ItextError {
-  const unsigned short ITEXT_ERR_ABORTED = 1; // fetching aborted
-  const unsigned short ITEXT_ERR_NETWORK = 2; // network error
-  const unsigned short ITEXT_ERR_PARSE = 3;   // parsing error of itext resource
-  const unsigned short ITEXT_ERR_SRC_NOT_SUPPORTED = 4; // unsuitable itext resource
-  const unsinged short ITEXT_ERR_LANG = 5;    // language mismatch
-  readonly attribute unsigned short code;
-};

Copied: itext/specification_v1.txt (from rev 4060, itext/specification.txt)
===================================================================
--- itext/specification_v1.txt	                        (rev 0)
+++ itext/specification_v1.txt	2009-11-26 00:41:41 UTC (rev 4064)
@@ -0,0 +1,145 @@
+/*
+* This work is licensed under the Creative Commons Attribution-Share Alike 3.0
+* Unported License. To view a copy of this license, visit
+* http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
+* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
+*
+* The Initial Developer of the Original Code is Mozilla Corporation.
+* Portions created by the Initial Developer are Copyright (C) 2009
+* the Initial Developer. All Rights Reserved.
+*
+* Contributor(s):
+*  Silvia Pfeiffer <silvia at silvia-pfeiffer.de>
+*
+*/
+
+
+Specification of the itext element
+==================================
+
+The itext element
+
+Categories
+    Metadata content.
+    Flow content.
+    Phrasing content.
+
+Contexts in which this element may be used:
+    In a video or audio element that is a child of a body element.
+
+Content model:
+    Empty.
+
+Content attributes:
+    Global attributes (include id and style)
+    category
+    src
+    lang
+    type
+    charset
+    display
+
+DOM interface:
+
+    [Callable=namedItem]
+    interface HTMLItextElement : HTMLElement {
+               attribute DOMString category;
+               attribute DOMString src;
+               attribute DOMString lang;
+               attribute DOMString type;
+               attribute DOMString charset;
+               attribute boolean display;
+
+      readonly attribute boolean fetched;
+      readonly attribute boolean enabled;
+      readonly attribute ItextError error;
+      readonly attribute float delay;
+      readonly attribute HTMLCollection allText;
+      readonly attribute langName;
+
+    void fetch();
+    DOMString currentText(currentTime);
+    void enable();
+    void disable();
+    void delay(seconds);
+    };    
+
+
+The itext element allows authors to include a link to an external file that contains informative text about the video. The external resource is expected to consist of a sequence of time intervals with associated text and potentially layout, styling, and animation information for the text. The text is displayed as the parent audio or video element goes through its time interval, i.e. the parent's currentTime reaches has reached the start time of the interval but has not yet reached the end time of the interval (a semi-open interval: [start,end) ).
+
+The category attribute describes what function the informative text represents and can be one of the following:
+* CC: closed captions (for the deaf)
+* SUB: subtitles (for i18n)
+* TAD: textual audio descriptions (for the blind; to be used as braille or through TTS)
+* KTV: karaoke
+* TIK: ticker text
+* AR: active regions
+* NB: semantic annotations, including speech bubbles and director comments
+* META: metadata, mostly machine-readable
+* TRX: transcripts / scripts
+* LRC: lyrics
+* LIN: linguistic markup
+* CUE: cue points, DVD style chapter markers and similar navigational landmarks
+
+The src  attribute gives the address of the external itext resource to use. The value of the attribute must be a valid URL identifying a text resource of the type given by the type attribute, if the attribute is present, or of the type "text/srt", if the attribute is absent.
+
+NOTE: text/srt will need to be registered as a mime type
+
+The type attribute gives the format of the data, RFC 2046. If the attribute is present, its value must be a valid MIME type, optionally with parameters. The charset parameter must not be specified. (The default, which is used if the attribute is absent, is "text/srt".) [RFC2046]
+
+The lang attribute, if present, gives the language of the linked resource. The value must be a valid RFC 3066 language code. [RFC3066]  User agents will use this attribute to select between, e.g., all itext elements given for a video or audio element that belong to the same category, but represent different languages. User agents that discover upon fetching of the resource that language information associated with the resource differs from the given lang, will set an error code on the element.
+
+The charset attribute gives the character encoding of the external text resource. If the attribute is set, its value must be a valid character encoding name, must be the preferred name for that encoding, and must match the encoding given in the charset parameter of the Content-Type metadata of the external file, if any. [IANACHARSET]
+
+The display attribute enables an author to specify whether an itext element is displayed by default, not displayed by default, or automatically displayed in association with its parent audio or video element based on conditions. The values of this attribute are { yes, no, auto } and the default value is "no". A user agent that comes across an "auto" display itext element has to activate it by default if its lang setting corresponds with the browser's default language setting.
+
+
+Further itext functionality:
+
+1. Itext fetching
+
+An itext resource is not automatically fetched as the element is parsed, since there may be a sizeable number of external resources to retrieve for an individual video or audio element. It is only fetched under the following circumstances:
+
+* if the display attribute is set to "yes", or
+* if the display attribute is set to "auto" and the lang matches to browser's default language setting, or
+* if the fetch() function has been called on the itext element.
+
+Fetching an itext resource means following the src URL and retrieving the resource. Fetching the external resource must not delay the load event of the element's document. The user agent will work with the fetched itext resource as soon as it is retrieved.
+
+2. Itext display
+
+An enabled itext resource displays its content on screen.
+
+An itext resource that has been fetched because of the display attribute is enabled by default.
+
+An itext resource that has been fetched using the fetch() function is disabled.
+
+An itext resource that is currently enabled can be disabled using the disable() function.
+An itext resource that is currently disabled can be enabled using the enable() function.
+
+3. Itext delay
+
+The itext resource is synchronised to its parent audio or video element through the parent's currentTime attribute. Sometimes, synchronisation can be off.
+
+The delay(seconds) function provides a method to offset the currentTime by a positive or negative float value to fix synchronisation. The readonly delay attribute defaults to 0 and is updated through calls to the delay(seconds) function.
+
+4. Itext text extraction
+
+The currentText(currentTime) function returns the current text segment from the itext resource, i.e. the text that is active at the parent's currentTime attribute value.
+
+The allText attribute allows access to all the text segments as extracted from the itext resource.
+
+The langName attribute exposes the full language name for the itext resource, such that a javascript developer can display it in a menu.
+
+5. Itext errors
+
+The error attribute contains the last error that may have appeared in relation to the itext resource.
+
+interface ItextError {
+  const unsigned short ITEXT_ERR_ABORTED = 1; // fetching aborted
+  const unsigned short ITEXT_ERR_NETWORK = 2; // network error
+  const unsigned short ITEXT_ERR_PARSE = 3;   // parsing error of itext resource
+  const unsigned short ITEXT_ERR_SRC_NOT_SUPPORTED = 4; // unsuitable itext resource
+  const unsinged short ITEXT_ERR_LANG = 5;    // language mismatch
+  readonly attribute unsigned short code;
+};

Added: itext/specification_v2.txt
===================================================================
--- itext/specification_v2.txt	                        (rev 0)
+++ itext/specification_v2.txt	2009-11-26 00:41:41 UTC (rev 4064)
@@ -0,0 +1,323 @@
+/*
+* This work is licensed under the Creative Commons Attribution-Share Alike 3.0
+* Unported License. To view a copy of this license, visit
+* http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
+* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
+*
+* The Initial Developer of the Original Code is Mozilla Corporation.
+* Portions created by the Initial Developer are Copyright (C) 2009
+* the Initial Developer. All Rights Reserved.
+*
+* Contributor(s):
+*  Silvia Pfeiffer <silvia at silvia-pfeiffer.de>
+*
+*/
+
+
+Specification of the itext element (Second Version)
+===================================================
+
+
+== Introduction ==
+
+The [https://wiki.mozilla.org/Accessibility/Experiment1_feedback feedback on the first version] has encouraged a full work-over of the specification.
+
+A particular change is the introduction of a grouping-level element between the media element and the itext element. This has several advantages: the itext elements inside this element are regarded as alternative tracks for display in one region, only at most one of them can be active at any point in time, a default display style can be associated with them, and event handlers for entering and leaving a new element can be associated. The only disadvantage is that there are now two new elements rather than only one to extend an already large HTML5 specification.
+
+Other feedback on attributes, events and on how to deal with in-line tracks has also been taken into account, such that this specification is taking a big step towards a more universal approach.
+
+Below are the specifications of the two new proposed elements: itextlist and itext, plus further suggestions on how browsers should deal with them.
+
+== The itextlist element ==
+
+The itextlist element
+
+Categories
+    Metadata content.
+    Flow content.
+    Phrasing content.
+
+Contexts in which this element may be used:
+    In a video or audio element that is a child of a body element.
+
+Content model:
+    One or more itext elements that are alternatives for the display area
+    of the itextlist element.
+
+Content attributes:
+    Global attributes (include id, class, title and style)
+    category
+    active
+
+DOM interface:
+
+    [Callable=namedItem]
+    interface HTMLItextListElement : HTMLElement {
+               attribute DOMString category;
+               attribute DOMString active;
+               attribute DOMString name;
+
+      // event handler 
+               attribute Function onenter;
+               attribute Function onleave;
+    };
+
+
+The itextlist element allows authors to provide a list of alternative information text tracks that relate to a video or audio element. These tracks provide e.g. captions or subtitles in alternative languages.
+
+1. Attributes
+
+The itextlist groups itext elements of the same category together. The "category" attribute describes what function the informative text represents and can be one of the following:
+* CC: closed captions (for the deaf)
+* SUB: subtitles (for i18n)
+* TAD: textual audio descriptions (for the blind; to be used as braille or through TTS)
+* KTV: karaoke
+* TIK: ticker text
+* AR: active regions
+* NB: semantic annotations, including speech bubbles and director comments
+* META: metadata, mostly machine-readable
+* TRX: transcripts / scripts
+* LRC: lyrics
+* LIN: linguistic markup
+* CUE: cue points, DVD style chapter markers and similar navigational landmarks
+
+The "active" attribute describes which itext element is active and can have the values "none", "auto", or the id name of a contained itext element. In case of an error, no itext element will be active. The default value is "auto", which means an itext track is selected based on the browser settings. These include the browser's language setting and its setting related to accessibility - e.g. for blind users no text is displayed, but if a TAD track is available, it will be activated in the selected language.
+
+The "name" attribute is optional. It specifies the name that should be used in a menu that is created when there are several itextlist elements and each itextlist represents a submenu.
+
+
+2. CSS default styling based on the category attribute
+
+Text itself:
+  color: white;
+  opacity: 100%;
+  text-align: center;
+
+
+CC,SUB,LRC,KTV,TRX,LIN area:
+  displayed on top of the video or above the audio element
+  centered on the width of the video or audio element  
+  aligned at the bottom of the video or audio element
+  above the controls if visible
+  background-color: #333333;
+  opacity:0.8;
+
+TAD area:
+  visibility: hidden;
+  aria-live: assertive;
+
+CUE area:
+  displayed above the video or audio element
+  centered on the width of the video or audio element  
+  aligned with the top of the video or audio element
+  background-color: #333333;
+
+others TBD
+
+
+3. Extension of video controls
+
+The existence of itextlist and itext element should cause the browser to extend the video or audio controls with a menu from which to select / activate / deactivate the available subtitle tracks. This menu must also be created upon parsing of a binary audio/video file that includes such tracks.
+
+
+4. Event handlers
+
+An active itext element will consist of a series of text elements with a start and a end time. Only one such text element is at most displayed per itextlist - the last element for which the audio or video element's currentTime is between its start and end time.
+
+As a new such text element is displayed, the itextlist element's registered onenter callback function is called - if one such has been registered.
+
+As the end of such a text element is reached, the itextlist element's registered onleave callback function is called - if one such has been registered.
+
+These functions allow cues to be associated with text elements, e.g. the display of a special offer, or moving to another sentence in a full text transcript of a video.
+
+
+== The itext element ==
+
+The itext element
+
+Categories
+    Metadata content.
+    Flow content.
+    Phrasing content.
+
+Contexts in which this element may be used:
+    In a itextlist element that is a child of a audio or video element.
+
+Content model:
+    Empty.
+
+Content attributes:
+    Global attributes (include id, class and style)
+    src
+    lang
+    type
+    charset
+
+DOM interface:
+
+    [Callable=namedItem]
+    interface HTMLItextElement : HTMLElement {
+               attribute DOMString src;
+               attribute DOMString lang;
+               attribute DOMString type;
+               attribute DOMString charset;
+               attribute float     delay;
+               attribute unsigned long stretch;
+
+      readonly attribute boolean fetched;
+      readonly attribute ItextError error;
+      readonly attribute HTMLCollection allText;
+      readonly attribute langName;
+
+      DOMString currentText(currentTime);
+    };    
+
+
+The itext element allows authors to include a link to an external file that contains informative text about the video. The external resource is expected to consist of a sequence of time intervals with associated text and potentially layout, styling, and animation information for the text. The text is displayed as the parent audio or video element goes through its time interval, i.e. the parent's currentTime has reached the start time of the interval but has not yet reached the end time of the interval (a semi-open interval: [start,end) ).
+
+
+1. Interpreting the itext resource
+
+The src  attribute gives the address of the external itext resource. The value of the attribute must be a valid URL identifying a text resource of the type given by the type attribute, if the attribute is present, or of the type "text/srt", if the attribute is absent. This attribute is required to enable the user agent to pick the correct parser for the file, even if it only receives a "text/plain" resource.
+
+The type attribute gives the format of the data, RFC 2046. If the attribute is present, its value must be a valid MIME type, optionally with parameters. The charset parameter must not be specified. (The default, which is used if the attribute is absent, is "text/srt".) [RFC2046]
+
+NOTE: text/srt will need to be registered as a mime type (as well as a format standardisation)
+
+The lang attribute, if present, gives the language of the linked resource. The value must be a valid RFC 3066 language code. [RFC3066]  User agents will use this attribute to select between, e.g., all itext elements given for a video or audio element that belong to the same category, but represent different languages. User agents that discover upon fetching of the resource that language information associated with the resource differs from the given lang, will set an error code on the element.
+
+The charset attribute gives the character encoding of the external text resource. If the attribute is set, its value must be a valid character encoding name, must be the preferred name for that encoding, and must match the encoding given in the charset parameter of the Content-Type metadata of the external file, if any. [IANACHARSET] This attribute is required since many formats and in particular text/srt does not provide the charset it is encoded in within the resource and thus the user agent has no way of knowing how to interpret and represent the characters. If the attribute is not given, a default of UTF-8 is assumed, unless the document itself indicates its charset.
+
+
+2. Itext fetching
+
+An itext resource is not automatically fetched as the element is parsed, since there may be a sizeable number of external resources to retrieve for an individual video or audio element. It is only fetched if the parent itextlist element activates it.
+
+Fetching an itext resource means following the src URL and retrieving the resource. Fetching the external resource must not delay the audio or video. The user agent will work with the fetched itext resource as soon as it is retrieved.
+
+The "fetched" attribute will signify if the fetching process has finished.
+
+
+3. Itext display
+
+An activated itext resource displays its content into a specified screen area provided by the browser based on default styling. If the active itext resource changes, the text will change to originate from the new resource as soon as possible to the browser without interrupting any of its other display requirements (e.g. audio/video playback).
+
+
+4. Itext adjustments
+
+The itext resource is synchronised to its parent audio or video element through the audio or video's currentTime attribute. Sometimes, synchronisation can be off.
+
+The delay and stretch attributes enables the publisher to make fixes to the timing information inside an itext resource. The "delay" attribute will start the itext resource with a delay and the "stretch" attribute will calculate a constant drift on each timing information of the itext resource. "delay" is given in seconds with 0 being the default, and "stretch" is given as a percentage with 100% the default.
+
+
+5. Itext errors
+
+The error attribute contains the last error that may have appeared in relation to the itext resource.
+
+interface ItextError {
+  const unsigned short ITEXT_ERR_ABORTED = 1; // fetching aborted
+  const unsigned short ITEXT_ERR_NETWORK = 2; // network error
+  const unsigned short ITEXT_ERR_PARSE = 3;   // parsing error of itext resource
+  const unsigned short ITEXT_ERR_SRC_NOT_SUPPORTED = 4; // unsuitable itext resource
+  const unsinged short ITEXT_ERR_LANG = 5;    // language mismatch
+  readonly attribute unsigned short code;
+};
+
+
+6. Other itext attributes
+
+The allText attribute allows access to all the text segments as extracted from the active itext resource.
+
+The langName attribute exposes the full language name for the itext resource, such that a JavaScript developer can display it in a menu. The lang attribute of the itext elements themselves contains the actual language code which is more appropriate for automated processing.
+
+
+7. Itext text extraction
+
+The currentText(currentTime) function returns the current text segment from the itext resource, i.e. the text that is active at the parent's currentTime attribute value.
+
+== Examples ==
+
+1. Simple subtitles example
+
+  <video src="video.ogv" controls>
+    <itextlist category="SUB">
+      <itext src="sub_en.srt" lang="en"/>
+      <itext src="sub_de.srt" lang="de"/>
+      <itext src="sub_fr.srt" lang="fr"/>
+      <itext src="sub_jp.srt" lang="jp"/>
+    </itextlist>
+  </video>
+
+The default type is "text/srt" and the default charset it "UTF-8".
+
+The default active track is selected from the language setting of the browser, if a match can be found in the browser settings prioritised languages.
+
+
+2. Caption example with diverse formats
+
+  <video src="video.ogv" controls>
+    <itextlist category="CC" active="none">
+      <itext src="caption_en.xml" lang="en" type="application/ttaf+xml"/>
+      <itext src="caption_de.srt"  lang="de" charset="ISO-8859-1" delay="3" stretch="97%"/>
+      <itext src="caption_fr.smil" lang="fr" type="application/smil+xml" />
+      <itext src="caption_jp.ssa"  lang="jp" type="application/x-ssa"/>
+    </itextlist>
+  </video>
+
+There are srt, dfxp, smil and ssa files in this specification. It is still questionable if a browser would want to support all these formats, but this specification provides for this possiblity.
+
+The srt file has a different charset. It also has to be delayed by 3s relative to the start of the video file and a stretch of 97% to make up for a constant drift in timing difference between the video and the caption file.
+
+Also note that none of the captions is active by default, but rather have to be turned on by a user interaction. This could possibly be overridden by the browser for a deaf user.
+
+
+3. Textual audio description example
+
+  <video src="video.ogv" aria-label="test video" title="test video" controls>
+    <itextlist category="TAD" active="tad_en">
+      <itext id="tad_en" src="tad_en.srt" lang="en"/>
+      <itext id="tad_de" src="tad_de.srt" lang="de"/>
+      <itext id="tad_fr" src="tad_fr.srt" lang="fr"/>
+      <itext id="tad_jp" src="tad_jp.srt" lang="jp"/>
+    </itextlist>
+  </video>
+
+The active textual audio description is the English track. It will be decoded and the text segments made available, but they won't be visually displayed since the default display style is hidden visibility. However, if a screen reader is available, the assertive aria-live attribute will force text changes to be read out.
+
+Also note how the video element now has an aria-label attribute, which will also be read out by a screen reader upon tabbing onto a video element. The menu that is being created from the itextlist and itext elements will also need to be made accessible.
+
+
+4. Chapter markers with cue ranges example
+
+  <video src="video.ogv" controls>
+    <itextlist category="CUE" onenter="showChapterImg()" onleave="removeChapterImg()">
+      <itext src="chapters_en.srt" lang="en"/>
+      <itext src="chapters_de.srt" lang="de"/>
+      <itext src="chapters_fr.srt" lang="fr"/>
+      <itext src="chapters_jp.srt" lang="jp"/>
+    </itextlist>
+  </video>
+
+A JavaScript function is called upon entering or leaving a new chapter.
+
+5. Multiple itextlist elements
+
+  <video src="video.ogv" aria-label="test video" title="test video" controls>
+    <itextlist category="SUB" name="subtitles">
+      <itext src="sub_en.srt" lang="en"/>
+      <itext src="sub_de.srt" lang="de"/>
+      <itext src="sub_fr.srt" lang="fr"/>
+      <itext src="sub_jp.srt" lang="jp"/>
+    </itextlist>
+
+    <itextlist category="TAD" active="tad_en" name="spoken transcript">
+      <itext id="tad_en" src="tad_en.srt" lang="en"/>
+      <itext id="tad_de" src="tad_de.srt" lang="de"/>
+      <itext id="tad_fr" src="tad_fr.srt" lang="fr"/>
+      <itext id="tad_jp" src="tad_jp.srt" lang="jp"/>
+    </itextlist>
+  </video>
+
+As the controls attribute in the video element is specified, this creates a menu with subtitles and spoken transcript as the submenu items to select from. Only one track can be activated at any point in time from within a itextlist. Also, an additional element of "none" should be added by the browser to allow to deactivate all itext elements.
+
+



More information about the commits mailing list