AudioListener.positionZ
The positionZ
read-only property of the AudioListener
interface is an AudioParam
representing the z position of the listener in 3D cartesian space.
Note: The parameter is a-rate when used with a PannerNode
whose PannerNode
is set to equalpower, or k-rate otherwise.
Syntax
var audioCtx = new AudioContext(); var myListener = audioCtx.listener; myListener.positionZ.value = 1;
Value
An AudioParam
. Its default value is 0, and it can range between positive and negative infinity.
Example
See BaseAudioContext.createPanner()
for example code.
Specifications
Specification |
---|
Web Audio API # dom-audiolistener-positionz |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
positionZ |
52 |
79 |
No
Supports a deprecated way of setting orientation - the
setOrientation() method. |
No |
39 |
14.1 |
52 |
52 |
No
Supports a deprecated way of setting orientation - the
setOrientation() method. |
41 |
14.5 |
6.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/positionZ