Add Track to media stream

2.9k views Asked by At

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

1

There are 1 answers

0
Philipp Hancke On

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)