-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
33 lines (20 loc) · 1.08 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: "AudioListener: positionX property"
short-title: positionX
slug: Web/API/AudioListener/positionX
page-type: web-api-instance-property
browser-compat: api.AudioListener.positionX
---
{{ APIRef("Web Audio API") }}
The `positionX` read-only property of the {{ domxref("AudioListener") }} interface is an {{domxref("AudioParam")}} representing the x position of the listener in 3D cartesian space.
> **Note:** The parameter is [_a-rate_](/en-US/docs/Web/API/AudioParam#a-rate) when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or [_k-rate_](/en-US/docs/Web/API/AudioParam#k-rate) otherwise.
## Value
An {{domxref("AudioParam")}}. Its default value is 0, and it can range between positive and negative infinity.
## Examples
See [`BaseAudioContext.createPanner()`](/en-US/docs/Web/API/BaseAudioContext/createPanner#examples) for example code.
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [Using the Web Audio API](/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API)