From fa3129a283e8992c8031063b2ced0800f955f290 Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:04:24 +0200 Subject: [PATCH] Add removeCandidatePairs method. --- index.html | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/index.html b/index.html index d7b227e..7c20bfe 100644 --- a/index.html +++ b/index.html @@ -968,6 +968,7 @@

attribute EventHandler onicecandidatepairremove; attribute EventHandler onicecandidatepairnominate; undefined setSelectedCandidatePair(RTCIceCandidatePair candidatePair); + undefined removeCandidatePairs(sequence<RTCIceCandidatePair> candidatePairs); };

Attributes

@@ -1029,6 +1030,67 @@

Methods

steps to [= change the selected candidate pair =].

+
+ removeCandidatePairs +
+
+

+ The {{removeCandidatePairs}} method immediately removes the provided candidate pairs, making them unavailable to use + for transport. The [= ICE agent =] may free up candidates once all the associated candidate pairs have been removed. +

+

+ When this method is invoked, the [= user agent =] MUST run the following steps: +

+
    +
  1. +

    + Let |connection:RTCPeerConnection| be the {{RTCPeerConnection}} object associated with this [= ICE agent =]. +

    +
  2. +
  3. +

    + If connection.{{RTCPeerConnection/[[IsClosed]]}} is + true, [= exception/throw =] an + {{InvalidStateError}}. +

    +
  4. +
  5. +

    + Let |transport:RTCIceTransport| be the associated {{RTCIceTransport}} object. +

    +
  6. +
  7. +

    + If |transport|.{{RTCIceTransport/[[IceTransportState]]}} is either of + {{RTCIceTransportState/"new"}}, {{RTCIceTransportState/"failed"}} or {{RTCIceTransportState/"closed"}}, [= + exception/throw =] + an {{InvalidStateError}}. +

    +
  8. +
  9. +

    + If |transport|.{{RTCIceTransport/[[ProposalPending]]}} is true, [= exception/throw =] an + {{InvalidStateError}}. +

    +
  10. +
  11. +

    + Instruct the [= ICE agent =] to remove the candidate pairs indicated by |candidatePairs|, ignoring any unknown + or invalid candidate pairs. +

    +
  12. +
  13. +

    + For each valid |removedPair| in |candidatePairs| that was removed by the [= ICE agent =], [= fire an event =] named + {{RTCIceTransport/icecandidatepairremove}} + at |transport|, using {{RTCIceCandidatePairEvent}}, with the + {{Event/cancelable}} attribute initialized to false, and the {{RTCIceCandidatePairEvent/local}} + and {{RTCIceCandidatePairEvent/remote}} attributes initialized to the local and remote candidates, respectively, + of |removedPair|. +

    +
  14. +
+