Created attachment 353183 [details] SDP offer and answer (failure) The scenario is the following: 1. Safari STP (with VP8 disabled) sends an audio/video offer to an SFU; 2. the SFU is configured to only accept opus/vp8, and so accepts the audio m-line and rejects the video m-line; 3. eventually, the PeerConnection is supposed to be audio only. This works in some cases, and doesn't in others. Specifically, it looks like it's failing when Safari puts the m-line video before the audio m-line. This is something our SFU supports correctly (the answer has the m-lines in the same order), but the setRemoteDescription in Safari fails with the following error: Failed to set remote answer sdp: The m= section:1 should be rejected. Apparently, the WebRTC stack seems to think that, since the first m-line (video, mid=0) was rejected, the second m-line (audio, mid=1) should be rejected as well. It works as expected if the rejected video m-line comes after the first audio m-line instead. Not sure if this bug was already there or if it's a regression, as I'm not a regular Safari/MacOS user: not exactly sure why Safari randomly switches the m-line order either, as we always add tracks in the same order in JavaScript. I'm attaching an example of SDP offer and answer that resulted in that issue. In case there's anything else I can provide that can be of use, please let me know.