Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions files/en-us/mozilla/firefox/releases/154/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Firefox 154 is the current [Beta version of Firefox](https://www.firefox.com/en-

#### Media, WebRTC, and Web Audio

- The {{domxref("RTCIceTransport.getSelectedCandidatePair()")}} method and {{domxref("RTCIceTransport/selectedcandidatepairchange_event", "selectedcandidatepairchange")}} event are now supported for getting the current {{domxref("RTCIceCandidatePair")}} for the transport.
([Firefox bug 2019332](https://bugzil.la/2019332)).
- The {{domxref("RTCDtlsTransport/error_event", "error")}} event is now fired on {{domxref("RTCDtlsTransport")}} to report DTLS and fingerprinting errors.
([Firefox bug 1805447](https://bugzil.la/1805447)).

Expand Down
9 changes: 6 additions & 3 deletions files/en-us/web/api/rtcicecandidatepair/local/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ browser-compat: api.RTCIceCandidatePair.local

{{APIRef("WebRTC")}}

The **`local`** property of the **{{domxref("RTCIceCandidatePair")}}** dictionary specifies the {{domxref("RTCIceCandidate")}} which describes the configuration of the local end of a viable WebRTC connection.
The **`local`** property of the {{domxref("RTCIceCandidatePair")}} interface specifies the {{domxref("RTCIceCandidate")}} that describes the configuration of the local end of a viable WebRTC connection.

The `RTCIceCandidatePair` is returned by the {{domxref("RTCIceTransport.getSelectedCandidatePair", "getSelectedCandidatePair()")}} method of {{domxref("RTCIceTransport")}}.

## Value

An {{domxref("RTCIceCandidate")}} which describes the configuration of the local end of a viable pair of ICE candidates.
The `RTCIceCandidatePair` is returned by the {{domxref("RTCIceTransport")}} method {{domxref("RTCIceTransport.getSelectedCandidatePair", "getSelectedCandidatePair()")}}.
An {{domxref("RTCIceCandidate")}}.

## Examples

### Basic usage

This one-line example obtains the current candidate pair and then from that gets the local candidate.

```js
Expand Down
24 changes: 9 additions & 15 deletions files/en-us/web/api/rtcicecandidatepair/remote/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@ browser-compat: api.RTCIceCandidatePair.remote

{{APIRef("WebRTC")}}

The **`remote`** property of the
**{{domxref("RTCIceCandidatePair")}}** dictionary specifies the
{{domxref("RTCIceCandidate")}} describing the configuration of the remote end of a
viable WebRTC connection.
The **`remote`** property of the {{domxref("RTCIceCandidatePair")}} interface specifies the {{domxref("RTCIceCandidate")}} that describes the configuration of the remote end of a viable WebRTC connection.

The `RTCIceCandidatePair` is returned by the {{domxref("RTCIceTransport.getSelectedCandidatePair", "getSelectedCandidatePair()")}} method of {{domxref("RTCIceTransport")}}.

## Value

An {{domxref("RTCIceCandidate")}} which describes the configuration of the remote end
of a viable pair of ICE candidates. The `RTCIceCandidatePair` is returned by
the {{domxref("RTCIceTransport")}} method
{{domxref("RTCIceTransport.getSelectedCandidatePair", "getSelectedCandidatePair()")}}.
An {{domxref("RTCIceCandidate")}}.

## Examples

This one-line example obtains the current candidate pair and then from that gets the
remote candidate.
### Basic usage

This one-line example obtains the current candidate pair and then from that gets the remote candidate.

```js
const candidatePair = pc
Expand All @@ -32,11 +29,8 @@ const candidatePair = pc
const remoteCandidate = candidatePair.remote;
```

The {{domxref("RTCIceTransport")}} is found by getting the list of
{{domxref("RTCRtpSender")}} objects for the {{domxref("RTCPeerConnection")}}
`pc`. In the first `RTCRtpSender`, we get the
{{domxref("RTCDtlsTransport")}} over which the media data is being transmitted and
finally, from that, the `RTCIceTransport`.
The {{domxref("RTCIceTransport")}} is found by getting the list of {{domxref("RTCRtpSender")}} objects for the {{domxref("RTCPeerConnection")}} `pc`.
In the first `RTCRtpSender`, we get the {{domxref("RTCDtlsTransport")}} over which the media data is being transmitted and finally, from that, the `RTCIceTransport`.

## Specifications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.RTCIceTransport.getSelectedCandidatePair

{{APIRef("WebRTC")}}

The **`getSelectedCandidatePair()`** method of the {{domxref("RTCIceTransport")}} interface returns an {{domxref("RTCIceCandidatePair")}} object containing the current best-choice pair of {{Glossary("ICE")}} candidates describing the configuration of the endpoints of the transport.
The **`getSelectedCandidatePair()`** method of the {{domxref("RTCIceTransport")}} interface returns an {{domxref("RTCIceCandidatePair")}} instance containing the current best-choice pair of {{Glossary("ICE")}} candidates describing the configuration of the endpoints of the transport.

## Syntax

Expand All @@ -22,14 +22,13 @@ None.

### Return value

A {{domxref("RTCIceCandidatePair")}} object describing the configurations of the currently-selected candidate pair's two endpoints.
{{domxref("RTCIceCandidatePair.local", "local")}} describes the configuration of the local end of the connection, while {{domxref("RTCIceCandidatePair.remote", "remote")}} describes the remote peer's configuration.
An {{domxref("RTCIceCandidatePair")}} instance describing the configurations of the currently-selected candidate pair's {{domxref("RTCIceCandidatePair.local", "local")}} and {{domxref("RTCIceCandidatePair.remote", "remote")}} endpoints.

The return value is `null` if no pair of candidates has been selected yet.

## Usage notes
## Description

As the ICE agent performs negotiation of a {{domxref("RTCPeerConnection")}}, it gathers and analyzes candidate configurations from each the two peers.
As the ICE agent performs negotiation of a {{domxref("RTCPeerConnection")}}, it gathers and analyzes candidate configurations from each of the two peers.
As soon as it finds an acceptable matching pair of candidates, meeting the requirements for the connection, a {{domxref("RTCIceTransport.selectedcandidatepairchange_event", "selectedcandidatepairchange")}} event is fired at the {{domxref("RTCIceTransport")}}.
From that time forward, the best matching pair of candidates will always be available by calling `getSelectedCandidatePair()`.

Expand Down