This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The channelCount property of the AudioNode interface represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.
channelCount's usage and precise definition depend on the value of AudioNode.channelCountMode:
channelCountMode value is max.channelCountMode value is clamped-max.channelCountMode value is explicit.An integer.
const audioCtx = new AudioContext(); const oscillator = audioCtx.createOscillator(); const gainNode = audioCtx.createGain(); oscillator.connect(gainNode); gainNode.connect(audioCtx.destination); oscillator.channelCount;
| Specification |
|---|
| Web Audio API> # dom-audionode-channelcount> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
channelCount |
27 | 12 | 25 | 15 | 7 | 27 | 25 | 15 | 7 | 1.5 | 4.4 | 7 |
© 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/AudioNode/channelCount