diff --git a/webrtc.html b/webrtc.html index a83c41ba2..fc0644551 100644 --- a/webrtc.html +++ b/webrtc.html @@ -1758,21 +1758,35 @@

  • If remote is true, and - description is of type {{RTCSdpType/"offer"}} - and contains a request to receive simulcast, and applying - description leads to modifying a - transceiver transceiver, and + description is of type + {{RTCSdpType/"offer"}}, then for each + [= media description =] requesting to receive simulcast + that already has an existing {{RTCRtpTransceiver}} object, + transceiver, associated with it, as described in + [[!RFC8829]], + if none of the encodings in transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}} - is non-empty, and not equal to the encodings that would - result from processing description, the - process of applying description fails. This - specification does not allow remotely initiated RID - renegotiation. + [=map/contain=] a {{RTCRtpCodingParameters/rid}} member + whose value matches any of the rids in the simulcast + attribute, then [= description fails | fail =] the + process of applying description. +

    + A change in rids values is tolerated in remote offers to + receive simulcast as long as at least one rid matches a + rid in the encodings that were previously negotiated, or + the offer is to no longer receive simulcast. + Mismatched or out-of-order rids result in layer removal, + and layer expansion is prevented in user agent answers. + This specification does not allow remotely initiated RID + renegotiation. +

  • - If the process to apply description fails for + If the process to apply + description fails for any reason, then the user agent MUST queue a task that runs the following steps:

    @@ -2322,7 +2336,8 @@

  • If the description is of type - {{RTCSdpType/"offer"}} and contains a request + {{RTCSdpType/"offer"}} and the + [= media description =] contains a request to receive simulcast, use the order of the rid values specified in the simulcast attribute to create an @@ -2330,24 +2345,24 @@

    each of the simulcast layers, populating the {{RTCRtpCodingParameters/rid}} member according to the corresponding rid value, and - let sendEncodings be the list - containing the created dictionaries. - Otherwise, let sendEncodings be an - empty list. + let proposedSendEncodings be the + list containing the created dictionaries. + Otherwise, let proposedSendEncodings + be an empty list.

  • Let supportedEncodings be the maximum number of encodings that the implementation can support. If the length of - sendEncodings is greater than + proposedSendEncodings is greater than supportedEncodings, truncate - sendEncodings so that its length is + proposedSendEncodings so that its length is supportedEncodings.
  • -
  • If sendEncodings is non-empty, set - each encoding's +
  • If proposedSendEncodings is non-empty, + set each encoding's {{RTCRtpEncodingParameters/scaleResolutionDownBy}} - to 2^(length of sendEncodings - + to 2^(length of proposedSendEncodings - encoding index - 1).
  • @@ -2363,13 +2378,25 @@

  • If a suitable transceiver was found - (transceiver is set) and - sendEncodings is non-empty, set - transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}} - to sendEncodings, and set - transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastReturnedParameters]]}} - to null. + (transceiver is set), and + proposedSendEncodings is non-empty, + run the following steps:

    +
      +
    1. +

      + If the length of + transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}} + is `1`, and the lone encoding + [=map/contains=] no + {{RTCRtpCodingParameters/rid}} member, set + transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}} + to proposedSendEncodings, and set + transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastReturnedParameters]]}} + to null. +

      +
    2. +
  • @@ -2384,7 +2411,7 @@

    [= Create an RTCRtpSender =], sender, from the [= media description =] using - sendEncodings. + proposedSendEncodings.

  • - If description rejects any of - the offered layers, then remove the - dictionaries that correspond to rejected - layers from + If description is missing any of + the previously negototiated layers, then + remove the dictionaries that correspond to + the missing layers from transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}}.