RTCPeerConnectionIceEvent: candidate property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2018.
Thuộc tính chỉ đọc candidate của giao diện RTCPeerConnectionIceEvent trả về RTCIceCandidate liên quan đến sự kiện.
Giá trị
Một đối tượng RTCIceCandidate đại diện cho ứng viên ICE đã nhận, hoặc null để cho biết không có thêm ứng viên nào cho phiên thương lượng này.
Ví dụ
js
pc.onicecandidate = (ev) => {
alert(
`The ICE candidate (transport address: '${ev.candidate.candidate}') has been added to this connection.`,
);
};
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebRTC: Real-Time Communication in Browsers> # dom-rtcpeerconnectioniceevent-candidate> |