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 GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
numberOfInputs |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.