The positionY
property of the PannerNode
interface specifies the Y coordinate of the audio source's position in 3D Cartesian coordinates. The complete vector is defined by the position of the audio source, given as (positionX
, positionY
, positionZ
), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationX
, orientationY
, orientationZ
).
Depending on the directionality of the sound (as specified using the attributes coneInnerAngle
, coneOuterAngle
, and codeOuterGain
), the orientation of the sound may alter the perceived volume of the sound as it's being played. If the sound is pointing toward the listener, it will be louder than if the sound is pointed away from the listener.
The AudioParam
contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its AudioParam.value
property.
var positionY = PannerNode.positionY; PannerNode.positionY.value = newPositionY;
An AudioParam
whose value
is the Y coordinate of the audio source's position, in 3D Cartesian coordinates.
Specification | Status | Comment |
---|---|---|
Web Audio API The definition of 'positionY' in that specification. | Working Draft |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | Yes | Yes | 50 | No | Yes | No |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | Yes | Yes | Yes | 50 | No | Yes | No |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/positionY