Web Audio API
MediaStreamAudioSourceNode 接口代表一个音频接口,是WebRTC MediaStream (比如一个摄像头或者麦克风) 的一部分。是个表现为音频源的AudioNode。
MediaElementSourceNode 没有输入,并且只有一个输出。创建之后使用 AudioContext.createMediaStreamSource方法。输出通道的数量和AudioMediaStreamTrack的通道数量相同。如果没有有效的媒体流,输出通道就变成一个静音的通道。
<table class="properties"> <tbody> <tr> <th scope="row">Number of inputs</th> <td><code>0</code></td> </tr> <tr> <th scope="row">Number of outputs</th> <td><code>1</code></td> </tr> <tr> <th scope="row">Channel count</th> <td> 由AudioMediaStreamTrack定义,传递给 AudioContext.createMediaStreamSource ,并由此创建。 </td> </tr> </tbody> </table>
构造器
- MediaStreamAudioSourceNode.MediaStreamAudioSourceNode()
- : 创建一个新的
MediaStreamAudioSourceNode实例。
- : 创建一个新的
属性
从 AudioNode 上继承。
方法
从 AudioNode 上继承。
示例
参见 AudioContext.createMediaStreamSource() 以获取有关该对象用法的示例代码。
规范
浏览器兼容性
参见
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
