diff options
Diffstat (limited to 'files/ru/web/api/rtcpeerconnection/icecandidate_event')
-rw-r--r-- | files/ru/web/api/rtcpeerconnection/icecandidate_event/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/ru/web/api/rtcpeerconnection/icecandidate_event/index.html b/files/ru/web/api/rtcpeerconnection/icecandidate_event/index.html index 4cf9d46d46..781f299272 100644 --- a/files/ru/web/api/rtcpeerconnection/icecandidate_event/index.html +++ b/files/ru/web/api/rtcpeerconnection/icecandidate_event/index.html @@ -36,7 +36,7 @@ translation_of: Web/API/RTCPeerConnection/icecandidate_event <p>В основном события <code>icecandidate</code> происходят, чтобы указать, что новый кандидат был построен (gathered). Этого кандидата нужно доставить удалённому клиенту (remote peer) через канал сигнализации (signaling channel), которым управляет ваш код.</p> -<pre class="brush: js notranslate">rtcPeerConnection.onicecandidate = (event) => { +<pre class="brush: js">rtcPeerConnection.onicecandidate = (event) => { if (event.candidate) { sendCandidateToRemotePeer(event.candidate) } else { @@ -63,7 +63,7 @@ translation_of: Web/API/RTCPeerConnection/icecandidate_event <p>If you need to perform any special actions when there are no further candidates expected, you're much better off watching the ICE gathering state by watching for {{domxref("RTCPeerConnection.icegatheringstatechange_event", "icegatheringstatechange")}} events:</p> -<pre class="brush: js notranslate">pc.addEventListener("icegatheringstatechange", ev => { +<pre class="brush: js">pc.addEventListener("icegatheringstatechange", ev => { switch(pc.iceGatheringState) { case "new": /* gathering is either just starting or has been reset */ @@ -88,7 +88,7 @@ translation_of: Web/API/RTCPeerConnection/icecandidate_event <p>First, an example using {{domxref("EventTarget.addEventListener", "addEventListener()")}}:</p> -<pre class="brush: js notranslate">pc.addEventListener("icecandidate", ev => { +<pre class="brush: js">pc.addEventListener("icecandidate", ev => { if (ev.candidate) { sendMessage({ type: "new-ice-candidate", @@ -100,7 +100,7 @@ translation_of: Web/API/RTCPeerConnection/icecandidate_event <p>You can also set the {{domxref("RTCPeerConnection.onicecandidate", "onicecandidate")}} event handler property directly:</p> -<pre class="brush: js notranslate">pc.onicecandidate = ev => { +<pre class="brush: js">pc.onicecandidate = ev => { if (ev.candidate) { sendMessage({ type: "new-ice-candidate", |