StereoPannerNode.pan
The pan
property of the StereoPannerNode
interface is an a-rate AudioParam
representing the amount of panning to apply. The value can range between -1
(full left pan) and 1
(full right pan).
Syntax
var audioCtx = new AudioContext(); var panNode = audioCtx.createStereoPanner(); panNode.pan.value = -0.5;
Returned value
An a-rate AudioParam
containing the panning to apply.
Note: Though the AudioParam
returned is read-only, the value it represents is not.
Example
See BaseAudioContext.createStereoPanner()
for example code.
Specifications
Specification |
---|
Web Audio API # dom-stereopannernode-pan |
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 | |
pan |
41 |
12 |
37 |
No |
28 |
14.1 |
41 |
41 |
37 |
28 |
14.5 |
4.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/StereoPannerNode/pan