Accessibility/HTML5 captions v2: Difference between revisions

removed delay() function
(removed random thoghts on 4th example)
(removed delay() function)
Line 151: Line 151:
       readonly attribute langName;
       readonly attribute langName;


      void fetch();
       DOMString currentText(currentTime);
       DOMString currentText(currentTime);
     };     
     };     
Line 174: Line 173:
2. Itext fetching
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 under the following circumstances:
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.


* if the parent itextlist element activates it or
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.
* 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.


The "fetched" attribute will signify if the fetching process has finished.
The "fetched" attribute will signify if the fetching process has finished.
Line 186: Line 182:
3. Itext display
3. Itext display


An activated itext resource displays its content on screen.
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).
 
An itext resource that has been fetched using the fetch() function is not activated until its itextlist parent activates it. In this way, itext resources can be pre-fetched.




Line 222: Line 216:


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 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 ==
== Examples ==