tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

AudioContext.webidl (1567B)


      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 */
     12 
     13 dictionary AudioContextOptions {
     14             float        sampleRate;
     15 };
     16 
     17 dictionary AudioTimestamp {
     18  double contextTime;
     19  DOMHighResTimeStamp performanceTime;
     20 };
     21 
     22 [Pref="dom.webaudio.enabled",
     23 Exposed=Window]
     24 interface AudioContext : BaseAudioContext {
     25    [Throws]
     26    constructor(optional AudioContextOptions contextOptions = {});
     27 
     28    readonly        attribute double               baseLatency;
     29    readonly        attribute double               outputLatency;
     30    AudioTimestamp                  getOutputTimestamp();
     31 
     32    [NewObject]
     33    Promise<undefined> suspend();
     34    [NewObject]
     35    Promise<undefined> close();
     36 
     37    [NewObject, Throws]
     38    MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
     39 
     40    [NewObject, Throws]
     41    MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
     42 
     43    [NewObject, Throws]
     44    MediaStreamTrackAudioSourceNode createMediaStreamTrackSource(MediaStreamTrack mediaStreamTrack);
     45 
     46    [NewObject, Throws]
     47    MediaStreamAudioDestinationNode createMediaStreamDestination();
     48 };