2

Is it possible to add or remove audio track to a stream after the stream connect to the pearConnection?

I was able to do it before ( in getUserMedia ) But it doesn't work after the stream connect to the peerConnection Thanks you

MoShe
  • 6,197
  • 17
  • 51
  • 77

1 Answers1

3

That is possible with the addTrack and removeTrack APIs. See https://webrtc.github.io/samples/src/content/peerconnection/upgrade/ for an example (and note that the argument to removeTrack is an RTCRtpSender, not a track)

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31