This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
The maxChannelCount property of the AudioDestinationNode interface is an unsigned long defining the maximum amount of channels that the physical device can handle.
The AudioNode.channelCount property can be set between 0 and this value (both included). If maxChannelCount is 0, like in OfflineAudioContext, the channel count cannot be changed.
An unsigned long.
The following would set up an audio graph, featuring an AudioDestinationNode with maxChannelCount of 2:
const audioCtx = new AudioContext(); const source = audioCtx.createMediaElementSource(myMediaElement); source.connect(gainNode); audioCtx.destination.maxChannelCount = 2; gainNode.connect(audioCtx.destination);
To see a more complete implementation, check out one of our MDN Web Audio examples, such as Voice-change-o-matic or Violent Theremin.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
maxChannelCount |
27 | 12 | 25 | 15 | 14.17–14.1This property always returns0. |
27 | 25 | 15 | 14.57–14.5This property always returns0. |
1.5 | 4.4 | 14.57–14.5This property always returns0. |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode/maxChannelCount