RTCPeerConnectionIceEvent.candidate

RTCPeerConnectionIceEvent (en-US) 인터페이스의 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

브라우저 호환성

BCD tables only load in the browser

참조