Your environment.
- Version: github.com/pion/webrtc/v4 v4.1.1
What did you do?
Creating a local track from a TrackRemote (remoteX),
localX, _ := webrtc.NewTrackLocalStaticRTP(remoteX.Codec().RTPCodecCapability, remoteX.ID(), remoteX.StreamID(), webrtc.WithRTPStreamID(remoteX.RID()))
Creating a another local track from a another TrackRemote (remoteY),
localY, _ := webrtc.NewTrackLocalStaticRTP(remoteY.Codec().RTPCodecCapability, remoteY.ID(), remoteY.StreamID(), webrtc.WithRTPStreamID(remoteY.RID()))
remoteX and remoteY are of same kind (Audio), codec type (VP8) and clock rate (90000)
Trying to replace localX with localY on the RTPSender with ReplaceTrack method.
What did you expect?
The remote peer attached to the RTPSender should receive switched video tracks when localX is replaced with localY & vice versa.
What happened?
The remote peer's video just freeze, when trying to replace localX with localY on the RTPSender.
Sample code to reproduce the issue
Running the same code:
https://github.com/selvan/webrtc/blob/issue-3149/examples/swap-tracks-via-replace