AudioListenerLimited availability
An AudioListener object represents the virtual position and orientation of a person relative to sound sources, to spatialize audio in a Web Audio context.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–51Not supported
52+Supportedsince Jul 20, 2016
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–14Not supported
14.1+Supportedsince Apr 26, 2021
Current: 27MobileChrome Android
18–51Not supported
52+Supportedsince Jul 27, 2016
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–14Not supported
14.5+Supportedsince Apr 26, 2021
Current: 27How to use
Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: AudioListener.
Feature detection
JS · check before using
if ("AudioListener" in globalThis) {
// AudioListener is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (10). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| AudioListener | 14 | 12 | 25 | 6 | 18 | 25 | 6 |
| AudioListener.forwardX | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.forwardY | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.forwardZ | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.positionX | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.positionY | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.positionZ | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.upX | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.upY | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |
| AudioListener.upZ | 52 | 79 | ✕ | 14.1 | 52 | ✕ | 14.5 |