mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Add AudioListener DOM interface
This commit is contained in:
parent
4b48cfa3ec
commit
9228ca3a02
5 changed files with 230 additions and 1 deletions
22
components/script/dom/webidls/AudioListener.webidl
Normal file
22
components/script/dom/webidls/AudioListener.webidl
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* 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
|
||||
* https://webaudio.github.io/web-audio-api/#audiolistener
|
||||
*/
|
||||
|
||||
[Exposed=Window]
|
||||
interface AudioListener {
|
||||
readonly attribute AudioParam positionX;
|
||||
readonly attribute AudioParam positionY;
|
||||
readonly attribute AudioParam positionZ;
|
||||
readonly attribute AudioParam forwardX;
|
||||
readonly attribute AudioParam forwardY;
|
||||
readonly attribute AudioParam forwardZ;
|
||||
readonly attribute AudioParam upX;
|
||||
readonly attribute AudioParam upY;
|
||||
readonly attribute AudioParam upZ;
|
||||
// void setPosition (float x, float y, float z);
|
||||
// void setOrientation (float x, float y, float z, float xUp, float yUp, float zUp);
|
||||
};
|
|
@ -20,7 +20,7 @@ interface BaseAudioContext : EventTarget {
|
|||
readonly attribute AudioDestinationNode destination;
|
||||
readonly attribute float sampleRate;
|
||||
readonly attribute double currentTime;
|
||||
// readonly attribute AudioListener listener;
|
||||
readonly attribute AudioListener listener;
|
||||
readonly attribute AudioContextState state;
|
||||
Promise<void> resume();
|
||||
attribute EventHandler onstatechange;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue