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] 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.