Skip to content

Issue with switching among tracks of same kind, codec & clock rate with ReplaceTrack of RTPSender #3149

@selvan

Description

@selvan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions