webrtc-pc icon indicating copy to clipboard operation
webrtc-pc copied to clipboard

webrtc-pc does not say to clear RTCRtpCodingParameters.rid when sRD rejects simulcast

Open docfaraday opened this issue 3 years ago • 1 comments

Spec says to truncate [[SendEncodings]] to size 1, but does not say anything about clearing the rid on that last encoding. Maybe this is harmless? Seems a bit weird to leave rid in there when nothing is using it, but maybe having a stable identifier is worth it?

Also, I guess I should point out that if scaleResolutionDownBy was auto-filled with powers of 2, truncating to size 1 leaves us with the thumbnail encoding, which also may be a little surprising.

docfaraday avatar May 16 '22 18:05 docfaraday

The more I think about this, the more I think it is a mistake to omit the rid when there is a (single) rid in SDP negotiation. This is because a reoffer could potentially go from this:

a=simulcast:recv 1;2;3

to this

a=simulcast:recv 2

That is, the remote side has decided to switch from simulcast to unicast, but wishes to keep the second encoding. It would be impossible to signal this appropriately to JS without keeping the rid property. And, if we keep the rid in this case, there is no good reason not to keep the rid if the reoffer contains a=simulcast:recv 1.

docfaraday avatar Sep 15 '22 17:09 docfaraday

Sounds like the way it already works is most desirable. Closing.

jan-ivar avatar Oct 14 '22 20:10 jan-ivar

Additionally, removing the rid would create a loophole out of the narrow-only logic.

jan-ivar avatar Oct 14 '22 21:10 jan-ivar