RTCPeerConnectionIceEvent: url property - Web APIs | MDN

Value

A string containing the URL of the STUN or TURN server used to gather this candidate, or null if the candidate was not gathered from a server (for example, a local host candidate).

Examples

Logging the ICE server URL

js

pc.onicecandidate = (event) => {
  if (event.candidate) {
    console.log(`Candidate gathered from: ${event.url}`);
  }
};

Specifications

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

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.