AudioListener: positionZ property
Web Audio API
Web Audio API
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.
Value
An AudioParam. Its default value is 0, and it can range between positive and negative infinity.
Examples
See BaseAudioContext.createPanner() for example code.