401
edits
(moved a point from discussion to description) |
(added Henri's comments) |
||
| Line 180: | Line 180: | ||
* Another way would be to provide a javascript API for the text elements. | * Another way would be to provide a javascript API for the text elements. | ||
DISCUSSION: | |||
Exposing timed text to scripts as DOM nodes is an interesting idea. | |||
However, exposing them as direct subelements is probably not the way to go for two reasons: | |||
1) The general expectation is that the DOM tree is the parse tree of one HTTP resource--that is, there's one Document object per HTTP resource. | |||
2) For security reasons, allowing a video file cause node insertion into an HTML DOM tree seems like a potentially dangerous thing. | |||
If a DOM tree representation is natural for the captioning format, it should probably be available under a separate Document object like iframe content. | |||
OTOH, the DOM is rather heavyweight, so if the caption renderer isn't DOM-based, it would probably be better to expose a lighter specialized JS API. | |||
=== Specification needs === | === Specification needs === | ||
edits