AudioNodeOptions

AudioNodeOptions dictionary of the Web 音频 API specifies options that can be used when creating new AudioNode 对象。

AudioNodeOptions is inherited from by the option objects of the different types of audio node constructors. See for example AnalyserNode.AnalyserNode or GainNode.GainNode .

句法

var audioNodeOptions = {
  "channelCount" : 2,
  "channelCountMode" : "max",
  "channelInterpretation" : "discrete"
}
					

特性

channelCount 可选
Represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node. (See AudioNode.channelCount for more information.) Its usage and precise definition depend on the value of AudioNodeOptions.channelCountMode .
channelCountMode 可选
Represents an enumerated value describing the way channels must be matched between the node's inputs and outputs. (See AudioNode.channelCountMode for more information including default values.)
channelInterpretation 可选
Represents an enumerated value describing the meaning of the channels. This interpretation will define how audio up-mixing and down-mixing will happen.
The possible values are "speakers" or "discrete" . (See AudioNode.channelCountMode for more information including default values.)

规范

规范 状态 Comment
Web 音频 API
The definition of 'AudioNodeOptions' in that specification.
工作草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
AudioNodeOptions Chrome 55 Edge ≤79 Firefox 53 IE ? Opera 42 Safari ? WebView Android 55 Chrome Android 55 Firefox Android 53 Opera Android 42 Safari iOS ? Samsung Internet Android 6.0

图例

完整支持
完整支持
兼容性未知
兼容性未知
  1. AudioNodeOptions