是否可以使用 Chrome 中的网络音频 API 从 RTCTrackEvent 操纵音频?
Is it possible to manipulate the audio from an RTCTrackEvent using the Web Audio API in Chrome?
我可以成功地将增益节点添加到来自文件的音频元素,但是当我尝试使用从 RTCTrackEvent 的音频流派生的流/音频元素时,它会忽略增益节点。我很好奇这是否可能。
是的,这是可能的,检查这个示例 - https://webrtc.github.io/samples/src/content/peerconnection/webaudio-input/
源代码 - https://github.com/webrtc/samples/tree/gh-pages/src/content/peerconnection/webaudio-input
Chrome 中存在一个已知错误,除非您进行破解并包含静音音频元素,否则该错误会导致流无法工作。有关方法和 jsfiddle 示例,请参阅 jmcker here 的答案。这解决了我的问题。
我可以成功地将增益节点添加到来自文件的音频元素,但是当我尝试使用从 RTCTrackEvent 的音频流派生的流/音频元素时,它会忽略增益节点。我很好奇这是否可能。
是的,这是可能的,检查这个示例 - https://webrtc.github.io/samples/src/content/peerconnection/webaudio-input/
源代码 - https://github.com/webrtc/samples/tree/gh-pages/src/content/peerconnection/webaudio-input
Chrome 中存在一个已知错误,除非您进行破解并包含静音音频元素,否则该错误会导致流无法工作。有关方法和 jsfiddle 示例,请参阅 jmcker here 的答案。这解决了我的问题。