RTCPeerConnectionIceEvent.candidate

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.

RTCPeerConnectionIceEvent 인터페이스의 candidate 속성은 읽기 전용입니다. 이 속성은 RTCIceCandidate와 관련된 이벤트를 반환합니다.

Syntax

js
var candidate = event.candidate;

ICE candidate를 나타내는 RTCIceCandidate 객체. 해당 네고시에이션 세션에 대한 candidate가 더 이상 존재하지 않으면, null을 반환합니다.

예시

js
pc.onicecandidate = function (ev) {
  alert(
    "The ICE candidate (transport address: '" +
      ev.candidate.candidate +
      "') has been added to this connection.",
  );
};

명세

Specification
WebRTC: Real-Time Communication in Browsers
# dom-rtcpeerconnectioniceevent-candidate

브라우저 호환성

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
candidate

Legend

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

Full support
Full support

참조