- From: Satish S <satish@google.com>
- Date: Fri, 12 Oct 2012 11:33:55 +0100
- To: Glen Shires <gshires@google.com>
- Cc: public-speech-api@w3.org
- Message-ID: <CAHZf7Rk+2NkdA_o3xAuyVu5uHehWEhfLrGDC-DNsTTOk68saXw@mail.gmail.com>
Makes sense. The samples should be updated as well to match this change.
Cheers
Satish
On Fri, Oct 12, 2012 at 2:41 AM, Glen Shires <gshires@google.com> wrote:
> I propose the following change to the SpeechSynthesis IDL to use a
> callback instead of events. It doesn't change functionality, but does make
> the IDL more well-defined and conventional. (The current IDL breaks
> platform conventions, because the speak() method makes a copy of utterance,
> and thus event.target cannot be properly defined, nor can addEventListener
> be used in the conventional manner.) The SpeechSynthesisEvent object is
> renamed SpeechSynthesisUpdate (because it is no longer an event, but rather
> a callback). If there's no disagreement, I'll update the spec with this on
> Monday.
>
> callback SpeechSynthesisCallback = void (SpeechSynthesisUpdate update);
>
> interface SpeechSynthesis {
> ...
> static void speak(SpeechSynthesisUtterance utterance,
> SpeechSynthesisCallback callback);
> };
>
> interface SpeechSynthesisUpdate {
> enum UpdateType {
> "start",
> "end",
> "pause",
> "resume",
> "mark",
> "boundary",
> "error"
> };
> readonly attribute UpdateType type;
> readonly attribute unsigned long charIndex;
> readonly attribute float elapsedTime;
> readonly attribute DOMString name;
> };
>
> /Glen Shires
>
Received on Friday, 12 October 2012 10:34:23 UTC