Back to Content

AudioData: numberOfChannels property

files/en-us/web/api/audiodata/numberofchannels/index.md

latest459 B
Original Source

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The numberOfChannels read-only property of the {{domxref("AudioData")}} interface returns the number of channels in the AudioData object.

Value

An integer.

Examples

The below example prints the value of numberOfChannels to the console.

js
console.log(AudioData.numberOfChannels);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}