Hi,
I don't know if this is the right place to ask but I am hoping someone might have information on why all major browsers I have tried (Chrome, Firefox, and Safari) behave this way.
If I create a simple offer like this:
const pc = new RTCPeerConnection();
pc.createOffer().then(offer => console.log(offer.sdp));The resulting SDP has no connection information ("c=" line).
If I create an SDP with a global c-line and no media descriptions and try set it as the local description I either get an error (Chrome, Safari) or the c-line is simply removed (Firefox). The error is something along the lines of "Failed to parse SessionDescription. c=IN IP4 x.x.x.x Expects m line". I can get the same error when I add a global c-line for an SDP that contains media descriptions. WebRTC (or at least the browser implementations I have tried this on) doesn't seem to like the idea of global connection information.
In a way I think that it doesn't make much sense to include connection information when there is no media, but
the RFC seems pretty clear:
"A session description MUST contain either at least one "c=" line in each media description or a single "c=" line at the session level."
Does anyone know if the WebRTC specification dictates that this is the correct behaviour and (if so) why?
It's not a real issue but we do get warnings that the SDP is not valid in some environments when we use our WebRTC client to initiate a session without media, which is what made me curious.
/Dan