Bug 1832033: change `CheckPopoverValidity` to match spec more closely. r=emilio
[gecko.git] / dom / webidl / AudioContext.webidl
blob804cb127a78958acd569d5183fe14332255df007
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://webaudio.github.io/web-audio-api/
8  *
9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 dictionary AudioContextOptions {
14              float        sampleRate;
17 dictionary AudioTimestamp {
18   double contextTime;
19   DOMHighResTimeStamp performanceTime;
22 [Pref="dom.webaudio.enabled",
23  Exposed=Window]
24 interface AudioContext : BaseAudioContext {
25     [Throws]
26     constructor(optional AudioContextOptions contextOptions = {});
28     readonly        attribute double               baseLatency;
29     readonly        attribute double               outputLatency;
30     AudioTimestamp                  getOutputTimestamp();
32     [NewObject]
33     Promise<undefined> suspend();
34     [NewObject]
35     Promise<undefined> close();
37     [NewObject, Throws]
38     MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
40     [NewObject, Throws]
41     MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
43     [NewObject, Throws]
44     MediaStreamTrackAudioSourceNode createMediaStreamTrackSource(MediaStreamTrack mediaStreamTrack);
46     [NewObject, Throws]
47     MediaStreamAudioDestinationNode createMediaStreamDestination();