[webrtc-pc] Should the remote track mute in response to replaceTrack(null)? (#3077)

henbos has just created a new issue for https://github.com/w3c/webrtc-pc:

== Should the remote track mute in response to replaceTrack(null)? ==
According to [spec](https://w3c.github.io/webrtc-pc/#mediastreamtrack-network-use), we unmute in response to receiving packets while being "receptive" and we mute in response to [processing the removal of a remote track](https://w3c.github.io/webrtc-pc/#process-remote-track-removal), which is basically when we're no longer receptive. It can also mute [if the SSRC goes away, e.g. RTP BYE or timeout](https://w3c.github.io/webrtc-pc/#mediastreamtrack-network-use) which makes sense because if the SSRC goes away we are unable to receive anymore.

It appears that the remote track's mute state is supposed to reflect whether or not reception is currently happening and that the event is supposed to inform the app when this changes.  But if the sender calls `replaceTrack(null)` which makes the sender "[stop sending](https://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-replacetrack)", reception is no longer happening yet the receiver's track's mute state does NOT change back to muted because the SSRC is still active and we didn't rengotiate it's direction.
- It seems strange that a receiver that isn't receiving any packets should remain unmuted indefinitely.
- In Chrome, this is extra confusing because we [mute video tracks](https://jsfiddle.net/fippo/1kj3xnqu/3/) but we [don't mute audio tracks](https://jsfiddle.net/fippo/1kj3xnqu/4/) when media stops flowing.

@guidou @fippo @jan-ivar 

Can we decide once and for all if we should or shouldn't mute in this case?

Also, side-note, why do we say that the SSRC can be removed due to a timeout that is unspecified, wouldn't that mean that if you replaceTrack(null) then there is some unknowable timeout that eventually kills your RTP stream? I doubt this is implemented or that we would want it to be implemented? Should we remove that sentence while we're at it?

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/3077 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 29 September 2025 12:04:08 UTC