Yes, displayed or hidden, but I don't necessarily think that the text needs to be visible for this to be useful. For example, if I wanted to load some data at the point where it hits a certain time and the user has chosen to hide the Karaoke lyrics, I'd still want the event to fire regardless. Maybe something like this: <itext cueStart="xxx" cueStop="xxx" id onCueStart="getUpdatedSRT(this)">Show this text</itext> function getUpdatedSRT(obj) { ... } Alternately (or additionally), it might be cool to be able to hook up the event object in some kind of declaration that covers all cues in a video object like this: document.video[0].onCue = runthisoncue; document.video["video1"].oncue = someotherfunction; function runthisoncue(e) { obj=e.sender; if (e.getAttribute("category").indexOf("CC")>-1) // if it contains the Closed Caption category { sendToTextReaderObject(); } } That would allow for a global event handler for all cues in a given video. Thoughts? Mike Simon On Mon, Aug 10, 2009 at 4:19 AM, Philip Jägenstedt <philipj@opera.com>wrote: > On Mon, 10 Aug 2009 11:22:18 +0200, m s <m@mikesimon.com> wrote: > > Actually the itext tag is exactly what I was shooting for. Some minor >> additions I'd like are: >> >> Add an onload and onunload event to each <itext> so that a given set of >> text could trigger a js function >> > > Assuming you mean an event for each time text should be displayed or > hidden, I'd love to see a concrete proposal for how this should work. > There's already an addCueRange/removeCueRanges interface in the spec which I > think should be replaced with something along these lines. You may want to > read > http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-July/021658.htmltoo. > > -- > Philip Jägenstedt > Core Developer > Opera Software >Received on Monday, 10 August 2009 11:49:12 UTC
This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:53 UTC