- From: Olli Pettay <Olli.Pettay@helsinki.fi>
- Date: Sat, 18 Aug 2012 00:36:55 +0300
- To: Dominic Mazzoni <dmazzoni@google.com>
- CC: public-speech-api@w3.org
[NoInterfaceObject]
interface SpeechSynthesisGetter
{
readonly attribute SpeechSynthesis speechSynthesis;
};
Window implements SpeechSynthesisGetter;
On 08/17/2012 08:59 PM, Dominic Mazzoni wrote:
> Sounds good, got rid of "static". Do you know the formal way to
> express window.speechSynthesis?
>
> Ex 1:
> speechSynthesis.speak(SpeechSynthesisUtterance('Hello World'));
>
> Ex 2:
> var u = new SpeechSynthesisUtterance();
> u.text = 'Hello World';
> u.lang = 'en-US';
> u.onend = function() { alert('Finished!'); }
> speechSynthesis.speak(u);
>
> interface SpeechSynthesis {
> readonly attribute boolean pending;
> readonly attribute boolean speaking;
> readonly attribute boolean paused;
>
> void speak(SpeechSynthesisUtterance utterance);
> void cancel(SpeechSynthesisUtterance utterance);
> void pause();
> void continue();
> void stopAndFlushQueue();
> }
>
> [Constructor,
> Constructor(DOMString text)]
> interface SpeechSynthesisUtterance {
> attribute DOMString text;
> attribute DOMString lang;
> attribute DOMString serviceURI;
>
> readonly attribute boolean speaking;
> readonly attribute boolean paused;
> readonly attribute boolean ended;
>
> attribute Function onstart;
> attribute Function onend;
> }
>
Received on Friday, 17 August 2012 21:37:27 UTC