Bug 1387454 - Add AudioContextOptions in webidl. r?padenot draft
authorAlex Chronopoulos <achronop@gmail.com>
Tue, 03 Apr 2018 20:02:15 +0300
changeset 777838 4fb56a2b615c996aae7ca0480fba2ba5c124b3dc
parent 776767 a1fb8ffae378963b128deaaf3a76eff9dbb6be21
child 777839 31136a73715b50ac52f17f04f1ddb6964ced5e1f
push id105302
push userachronop@gmail.com
push dateThu, 05 Apr 2018 11:36:40 +0000
reviewerspadenot
bugs1387454
milestone61.0a1
Bug 1387454 - Add AudioContextOptions in webidl. r?padenot MozReview-Commit-ID: K4PApVzJffG
dom/webidl/AudioContext.webidl
--- a/dom/webidl/AudioContext.webidl
+++ b/dom/webidl/AudioContext.webidl
@@ -5,18 +5,22 @@
  *
  * The origin of this IDL file is
  * https://webaudio.github.io/web-audio-api/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Constructor,
- Pref="dom.webaudio.enabled"]
+dictionary AudioContextOptions {
+             float        sampleRate = 0;
+};
+
+[Pref="dom.webaudio.enabled",
+ Constructor(optional AudioContextOptions contextOptions)]
 interface AudioContext : BaseAudioContext {
 
     // Bug 1324545: readonly        attribute double outputLatency;
     // Bug 1324545: AudioTimestamp                  getOutputTimestamp ();
 
     [Throws]
     Promise<void> suspend();
     [Throws]