diff --git a/amendments.json b/amendments.json index 841277e61..7391ca640 100644 --- a/amendments.json +++ b/amendments.json @@ -532,7 +532,7 @@ ], "dom-datachannel-binarytype-desc": [ { - "description": "Fix binaryType setter requriements", + "description": "Fix binaryType setter requirements", "pr": 2909, "type": "correction", "status": "candidate", @@ -548,5 +548,20 @@ "status": "candidate", "id": 40 } + ], + "setcodecpreferences-receive": [ + { + "description": "setCodecPreferences only takes into account receive codecs", + "pr": 2926, + "type": "correction", + "status": "candidate", + "tests": [ + "webrtc/RTCRtpTransceiver-setCodecPreferences.html" + ], + "testUpdates": [ + "web-platform-tests/wpt#44318" + ], + "id": 40 + } ] } diff --git a/base-rec.html b/base-rec.html index e22bc886b..4800fb3ed 100644 --- a/base-rec.html +++ b/base-rec.html @@ -11037,6 +11037,7 @@

setCodecPreferences
+

The setCodecPreferences method overrides the default codec preferences used by the user agent. When @@ -11101,6 +11102,7 @@

When setCodecPreferences() in invoked, the user agent MUST run the following steps:

+

  1. diff --git a/webrtc.html b/webrtc.html index bec6ff19b..851910f3a 100644 --- a/webrtc.html +++ b/webrtc.html @@ -11179,9 +11179,10 @@

    setCodecPreferences
    +

    The {{setCodecPreferences}} method overrides the default - codec preferences used by the user agent. When + receive codec preferences used by the user agent. When generating a session description using either {{RTCPeerConnection/createOffer}} or {{RTCPeerConnection/createAnswer}}, the user agent @@ -11219,8 +11220,6 @@

    {{setCodecPreferences}} will reject attempts to set codecs [= codec match | not matching =] codecs found in - {{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(kind) - or {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind), where kind is the kind of the {{RTCRtpTransceiver}} on which the method is called. @@ -11276,10 +11275,8 @@

  2. If the intersection between codecs and - {{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(kind).{{RTCRtpParameters/codecs}} - or the intersection between codecs and {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind).{{RTCRtpParameters/codecs}} - only contains RTX, RED or FEC codecs or is an empty set, + only contains RTX, RED, FEC codecs or Comfort Noise codecs or is an empty set, throw {{InvalidModificationError}}. This ensures that we always have something to offer, regardless of transceiver.{{RTCRtpTransceiver/direction}}. @@ -11287,9 +11284,7 @@

  3. - Let codecCapabilities be the union of - {{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(kind).{{RTCRtpParameters/codecs}} - and + Let codecCapabilities be {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind).{{RTCRtpParameters/codecs}}.

  4. @@ -11312,6 +11307,7 @@

+

The codec match algorithm given two {{RTCRtpCodec}} first and second is as follows: @@ -11355,7 +11351,7 @@

- If set, the offerer's codec preferences will decide the order + If set, the offerer's receive codec preferences will decide the order of the codecs in the offer. If the answerer does not have any codec preferences then the same order will be used in the answer. However, if the answerer also has codec preferences,