BaseAudioContext.listener

The listener property of the BaseAudioContext interface returns an AudioListener object that can then be used for implementing 3D audio spatialization.

Syntax

baseAudioContext.listener;

Value

An AudioListener object.

Example

Note: for a full Web Audio spatialization example, see our panner-node demo.

var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

...

var myListener = audioCtx.listener;

Specifications

Specification Status Comment
Web Audio API
The definition of 'listener' in that specification.
Working Draft  

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support10 webkit Yes25 No

22

15 webkit

6 webkit
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes33 Yes26 Yes No ?

See also

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills, erikadoyle, teoli
Last updated by: fscholz,