From 29b4592a883de9b3848e34924b42ff195a7505a1 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 15 Apr 2024 08:11:34 +0800 Subject: [PATCH] Fix property name `iceTransport` (#33069) * Fix property name `iceTransport` The property name `iceTransport` of `RTCDtlsTransport` is not `transport`. * Update index.md - just some layout tidy --------- Co-authored-by: Hamish Willee --- .../api/rtcicecandidatepair/local/index.md | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/files/en-us/web/api/rtcicecandidatepair/local/index.md b/files/en-us/web/api/rtcicecandidatepair/local/index.md index 0978f1484f440db..f36d0a8f896966d 100644 --- a/files/en-us/web/api/rtcicecandidatepair/local/index.md +++ b/files/en-us/web/api/rtcicecandidatepair/local/index.md @@ -8,35 +8,26 @@ 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")}}** dictionary specifies the {{domxref("RTCIceCandidate")}} which describes the configuration of the local end of a viable WebRTC connection. ## 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")}} 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()")}}. ## Examples -This one-line example obtains the current candidate pair and then from that gets the -local candidate. +This one-line example obtains the current candidate pair and then from that gets the local candidate. ```js const candidatePair = pc .getSenders()[0] - .transport.transport.getSelectedCandidatePair(); + .transport.iceTransport.getSelectedCandidatePair(); const localCandidate = candidatePair.local; ``` -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