{{ APIRef() }}
The StereoPannerNode
interface of the Web Audio API represents a simple stereo panner node that can be used to pan an audio stream left or right. It is an {{domxref("AudioNode")}} audio-processing module that positions an incoming audio stream in a stereo image using a low-cost equal-power panning algorithm.
The {{domxref("StereoPannerNode.pan", "pan")}} property takes a unitless value between -1
(full left pan) and 1
(full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full {{domxref("PannerNode")}}.
- Number of inputs
1
- Number of outputs
1
- Channel count mode
"clamped-max"
- Channel count
2
- Channel interpretation
"speakers"
Properties
Inherits properties from its parent, {{domxref("AudioNode")}}.
- {{domxref("StereoPannerNode.pan")}} {{readonlyinline}}
- Is an {{a-rate}} {{domxref("AudioParam")}} representing the amount of panning to apply.
Methods
No specific method; inherits methods from its parent, {{domxref("AudioNode")}}.
Example
{{page("/en-US/docs/Web/API/AudioContext.createStereoPanner","Example")}}
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-stereopannernode-interface', 'StereoPannerNode')}} | {{Spec2('Web Audio API')}} | Initial definition |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(42.0)}} | {{CompatGeckoDesktop(37.0)}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | 37.0 | 2.2 | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatVersionUnknown}} |