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

sRD(offer) completely overwrites pre-existing transceiver.[[Sender]].[[SendEncodings]]

Open docfaraday opened this issue 2 years ago • 6 comments

Presently, the language that describes how to handle simulcast in a remote offer says that [[SendEncodings]] is completely replaced based on the rids in the simulcast attribute. While this works fine for transceivers that are not yet associated, for already associated transceivers (which have already populated [[SendEncodings]]), this is not appropriate.

We need to specify what happens on sRD(offer) when there is already an associated transceiver. Since we (rightly) allow sRD(answer) to remove pre-existing rids, we probably need to allow sRD(offer) to remove pre-existing rids as well (since the base simulcast spec requires the answerer to handle this situation). We also need to ensure that the language around createAnswer does the right thing if the offer tries to add a rid (ie; the answer will not contain that new rid).

It probably does not make sense to allow sRD(offer) to add or reorder rids on an already associated transceiver, but I suppose if there's a use-case we want to support we could try something like that. We also do not want to modify any preexisting element in [[SendEncodings]]; we should not try to automatically update scaleResolutionDownBy, for example. So sRD(offer) would only be able to remove elements from [[SendEncodings]], and no other modification would be possible, pretty much the same as the existing rules for sRD(answer).

docfaraday avatar Apr 22 '22 17:04 docfaraday

isn't that related to chrome's continued lack of compliance in its so-called "spec-compliant simulcast"?

fippo avatar Apr 22 '22 19:04 fippo

Possibly? I'm not sure exactly what you're referring to wrt bugs in Chrome simulcast.

docfaraday avatar Apr 22 '22 19:04 docfaraday

see #2155

fippo avatar Apr 22 '22 19:04 fippo

So the "lack of compliance" you're referring to is the lack of support for the change in https://github.com/w3c/webrtc-pc/pull/2155?

Whatever the case, https://github.com/w3c/webrtc-pc/pull/2155 is closely related to this issue.

docfaraday avatar Apr 22 '22 19:04 docfaraday

Yes we're failing to handle the "already associated" case correctly here, which was what I missed in https://github.com/w3c/webrtc-pc/pull/2155#discussion_r272185898 (because the "else" of creating a new set of transceivers each time, is clearly not what anyone meant).

What @docfaraday proposed SGTM.

jan-ivar avatar Apr 25 '22 22:04 jan-ivar

Feedback from June 19, 2022 WEBRTC WG Virtual Interim: "Ready for PR"

aboba avatar Jul 19 '22 22:07 aboba