RTCPeerConnectionIceEvent

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

* Some parts of this feature may have varying levels of support.

RTCPeerConnectionIceEvent インターフェイスは、通常 RTCPeerConnectionの ICE 候補に関連して発生するイベントを表現します。

この型のイベントは、 icecandidate の 1 つだけです。

Event RTCPeerConnectionIceEvent

インスタンスプロパティ

RTCPeerConnectionIceEventEvent の一種であり、このイベントはそのプロパティも実装しています。

RTCPeerConnectionIceEvent.candidate 読取専用

イベントに関連付けられた候補を含む RTCIceCandidate を格納し、このイベントがこれ以上来る候補がないことを示す場合は null を格納します。

コンストラクター

RTCPeerConnectionIceEvent()

新しい RTCPeerConnectionIceEvent を返します。このコンストラクターは 2 つの引数を持ち、最初の引数はイベントの種類を表す文字列であり、 2 つ目は RTCIceCandidate を含む辞書です。

インスタンスメソッド

RTCPeerConnectionIceEventEvent の一種であり、このイベントはそのプロパティも実装しています。 RTCDataChannelEvent に固有のメソッドはありません。

js
pc.onicecandidate = (ev) => {
  console.log(
    `The ICE candidate (trsp addr: '${ev.candidate.candidate}') added to connection.`,
  );
};

仕様書

Specification
WebRTC: Real-Time Communication in Browsers
# rtcpeerconnectioniceevent

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
RTCPeerConnectionIceEvent
RTCPeerConnectionIceEvent() constructor
candidate
url

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Uses a non-standard name.
Has more compatibility info.

関連情報