将通过webRTC PeerConnection接收的流改为Web Audio API的AudioNodes

时间:2015-02-19 05:18:57

标签: webrtc web-audio

Send MediaStream object with Web Audio effects over PeerConnection的补充问题。

到目前为止,我已尝试将远程流连接到AudioContext.destination:

      var remoteSource = context.createMediaStreamSource(webRTCStream);
      var delayFilter = context.createDelay(10.0);
      var destination = context.destination;
      remoteSource.disconnect(destination);
      remoteSource.connect(delayFilter);
      delayFilter.connect(destination);

连接到MediaStreamDestination,然后连接到context.destination

     var destination = context.createMediaStreamDestination();
     delayFilter.connect(destination);
     destination.connect(context.destination);

我甚至试图从它自己的html元素拦截轨道(这对于html5< audio>标签非常有效)

  myAudio.src = window.URL.createObjectURL(webRtcStream);

  var remoteSource = context.createMediaElementSource(myAudio);
  var delayFilter = context.createDelay(10.0);
  var destination = context.createMediaStreamDestination();

  remoteSource.disconnect(context.destination);
  remoteSource.connect(delayFilter);
  delayFilter.connect(destination);
  destination.connect(context.destination);

然而,它们都不适用于Chrome或Firefox ......我错过了什么?或者它不应该工作/不实现?

0 个答案:

没有答案