From 34cf2efa79e3779213aaae2fa12ea2400c6f2db6 Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:02:20 +0100 Subject: [PATCH 1/2] Rename setSelectedCandidatePair to selectCandidatePair --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 46a81a0..878cf98 100644 --- a/index.html +++ b/index.html @@ -769,7 +769,7 @@

If |accepted| is false, instruct the [= ICE agent =] to not {{nominate}} |candidatePair|, and instead to continue to perform connectivity checks. The [= ICE agent =] may continue to send data using the candidate pair indicated by |candidatePair| unless instructed to use another candidate pair with - {{RTCIceTransport/setSelectedCandidatePair}}. + {{RTCIceTransport/selectCandidatePair}}.

  • @@ -855,7 +855,7 @@

    attribute EventHandler onicecandidatepairadd; attribute EventHandler onicecandidatepairremove; attribute EventHandler onicecandidatepairnominate; - undefined setSelectedCandidatePair(RTCIceCandidatePair candidatePair); + undefined selectCandidatePair(RTCIceCandidatePair candidatePair); };

    Attributes

    @@ -906,11 +906,11 @@

    Attributes

    Methods

    - setSelectedCandidatePair + selectCandidatePair

    - The {{setSelectedCandidatePair}} method attempts to select a different candidate pair to send data + The {{selectCandidatePair}} method attempts to select a different candidate pair to send data over. If successful, data will be sent on the provided candidate pair. It is meant to be called after the application defers the {{nomination}} of a candidate pair by cancelling the {{RTCIceTransport/icecandidatepairnominate}} event. From 617394914a1b827d45dfeb12862f352aba5386cd Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:57:58 +0100 Subject: [PATCH 2/2] Return a Promise from selectCandidatePair. --- index.html | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 878cf98..1a3ccbc 100644 --- a/index.html +++ b/index.html @@ -855,7 +855,7 @@

    attribute EventHandler onicecandidatepairadd; attribute EventHandler onicecandidatepairremove; attribute EventHandler onicecandidatepairnominate; - undefined selectCandidatePair(RTCIceCandidatePair candidatePair); + Promise<undefined> selectCandidatePair(RTCIceCandidatePair candidatePair); };

    Attributes

    @@ -956,8 +956,36 @@

    Methods

  • - Instruct the [= ICE agent =] to use |candidatePair| to send data, and continue to the steps for a change in the selected - candidate pair (leading up to {{RTCIceTransport/onselectedcandidatepairchange}}). + Let |p:Promise| be a new promise. +

    +
  • +
  • +

    + In parallel, instruct the [= ICE agent =] to use |candidatePair| to send data. +

    +
      +
    1. +

      + When the [= ICE agent =] has completed selecting |candidatePair|, [= queue a task =] to run the following steps: +

      +
        +
      1. +

        + Run the steps for a change in the selected candidate pair for an {{RTCIceTransport}}, leading up to a change in the {{RTCIceTransport/[[SelectedCandidatePair]]}} internal slot and {{RTCIceTransport/onselectedcandidatepairchange}}. +

        +
      2. +
      3. +

        + Resolve p. +

        +
      4. +
      +
    2. +
    +
  • +
  • +

    + Return p.