diff --git a/amendments.json b/amendments.json index 51f036f04..8545b7ed8 100644 --- a/amendments.json +++ b/amendments.json @@ -934,5 +934,14 @@ "id": 46, "testUpdates": "already-tested" } + ], + "rtcicecandidatepair": [ + { + "description": "Convert RTCIceCandidatePair dictionary to an interface", + "pr": 2961, + "type": "addition", + "status": "candidate", + "id": 45 + } ] } diff --git a/webrtc.html b/webrtc.html index d9592da25..4fe75ca2e 100644 --- a/webrtc.html +++ b/webrtc.html @@ -12343,9 +12343,7 @@

  1. - Let newCandidatePair be a newly created - {{RTCIceCandidatePair}} representing the indicated pair if - one is selected, and null otherwise. + Let newCandidatePair be the result of [= creating an RTCIceCandidatePair =] with |local:RTCIceCandidate| and |remote:RTCIceCandidate|, representing the local and remote candidates of the indicated pair if one is selected, and null otherwise.

  2. @@ -12669,35 +12667,56 @@

    - RTCIceCandidatePair Dictionary + RTCIceCandidatePair Interface

    +

    + This interface represents an ICE candidate pair, described in Section 4 in [[RFC8445]]. An {{RTCIceCandidatePair}} is a pairing of a local and a remote {{RTCIceCandidate}}. +

    +

    + To create an RTCIceCandidatePair with {{RTCIceCandidate}} objects, |local:RTCIceCandidate| and |remote:RTCIceCandidate|, run the following steps: +

    +
      +
    1. + Let |candidatePair:RTCIceCandidatePair| be a newly created {{RTCIceCandidatePair}} object. +
    2. +
    3. + Let |candidatePair| have a [[\Local]] internal slot, initialized to |local|. +
    4. +
    5. + Let |candidatePair| have a [[\Remote]] internal slot, initialized to |remote|. +
    6. +
    7. + Return |candidatePair|. +
    8. +
    -
    dictionary RTCIceCandidatePair {
    -  required RTCIceCandidate local;
    -  required RTCIceCandidate remote;
    +            
    [Exposed=Window]
    +interface RTCIceCandidatePair {
    +  [SameObject] readonly attribute RTCIceCandidate local;
    +  [SameObject] readonly attribute RTCIceCandidate remote;
     };

    - Dictionary {{RTCIceCandidatePair}} Members + Attributes

    + "RTCIceCandidatePair" class="attributes">
    local of type {{RTCIceCandidate}} + "idlAttrType">{{RTCIceCandidate}}, readonly

    - The local ICE candidate. + The {{local}} attribute MUST, on getting, return the value of the {{RTCIceCandidatePair/[[Local]]}} internal slot.

    remote of type {{RTCIceCandidate}} + "idlAttrType">{{RTCIceCandidate}}, readonly

    - The remote ICE candidate. + The {{remote}} attribute MUST, on getting, return the value of the {{RTCIceCandidatePair/[[Remote]]}} internal slot.