Re: Addendum to the new <audio> tag.

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:[0].onCue = runthisoncue;["video1"].oncue = someotherfunction;

function runthisoncue(e)
   if (e.getAttribute("category").indexOf("CC")>-1)  // if it contains the
Closed Caption category

That would allow for a global event handler for all cues in a given video.


Mike Simon

On Mon, Aug 10, 2009 at 4:19 AM, Philip Jägenstedt <>wrote:

> On Mon, 10 Aug 2009 11:22:18 +0200, m s <> 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
> --
> Philip Jägenstedt
> Core Developer
> Opera Software

Received on Monday, 10 August 2009 11:49:12 UTC