AudioNode.numberOfInputs

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.

AudioNode 인터페이스의 numberOfInputs 속성은 해당 노드에 공급되는 입력의 수를 반환합니다. 소스 노드는 numberOfInputs 속성의 값이 0인 노드로 정의됩니다.

구문

js
var numInputs = audioNode.numberOfInputs;

integer ≥ 0.

예제

js
const audioCtx = new AudioContext();

const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();

oscillator.connect(gainNode).connect(audioCtx.destination);

console.log(oscillator.numberOfInputs); // 0
console.log(gainNode.numberOfInputs); // 1
console.log(audioCtx.destination.numberOfInputs); // 1

명세서

Specification
Web Audio API
# dom-audionode-numberofinputs

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
numberOfInputs

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

같이 보기