dom/webidl/SpeechSynthesis.webidl
author Eitan Isaacson <eitan@monotonous.org>
Wed, 05 Aug 2015 10:25:42 -0700
changeset 288086 e5b42fb931a655c9db67c988321f3aa26b526d39
parent 288085 a300bd34d135cc28ec719591aacc33c875984a99
child 288093 25d448978f89083662611831740bbc7308cfb280
permissions -rw-r--r--
Bug 1188099 - (Part 3) Introduce [ChromeOnly] SpeechSynthesis.forceEnd for tests. r=smaug r=kdavis

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * The origin of this IDL file is
 * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
 *
 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
 * liability, trademark and document use rules apply.
 */

[Pref="media.webspeech.synth.enabled"]
interface SpeechSynthesis {
  readonly attribute boolean pending;
  readonly attribute boolean speaking;
  readonly attribute boolean paused;

  [UnsafeInPrerendering]
  void speak(SpeechSynthesisUtterance utterance);
  void cancel();
  void pause();
  [UnsafeInPrerendering]
  void resume();
  sequence<SpeechSynthesisVoice> getVoices();

  [ChromeOnly]
  // Force an utterance to end. Circumvents bad speech service implementations.
  void forceEnd();
};