W3C home > Mailing lists > Public > public-html@w3.org > August 2009

Re: Addendum to the new <audio> tag.

From: m s <m@mikesimon.com>
Date: Mon, 10 Aug 2009 04:48:30 -0700
Message-ID: <8bc486c00908100448o2c82b0d1gc3a8fc4bfd6ae132@mail.gmail.com>
To: Philip Jägenstedt <philipj@opera.com>
Cc: Silvia Pfeiffer <silviapfeiffer1@gmail.com>, public-html@w3.org
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.3.1 : Monday, 29 September 2014 09:39:06 UTC