Web/API/RTCIceCandidateStats/address

From Get docs


The address property of the RTCIceCandidateStats dictionary indicates the address of the ICE candidate. While it's preferred that the address be specified as an IPv4 or IPv6 numeric address, a fully-qualified domain name can be used as well. When a domain name is specified, the first IP address selected for that address is used, even if the domain name maps to multiple IP addresses.

Syntax

candidateAddress = rtcIceCandidateStats.address;

Value

Either an IPv4 or IPv6 address or a fully-qualified domain name, which corresponds to the candidate.

  • If the value of address is comprised entirely of digits from 0-9 with periods as separators, the value is interpreted as an IPv4 address.
  • If the value is entirely comprised of hexadecimal digits and colon (":")  characters, it is interpreted as an IPv6 address.
  • Otherwise, the address is presumed to be a fully-qualified domain name, which is resolved first using an AAAA record (assuming IPv6 is available), then using an A record (if no result is found or the device onlu supports IPv4). If multiple IP addresses are returned in response to the query, the user agent selects one, which is then used for the duration of ICE processing.

Usage notes

The address property was previously known as ip, and only permitted IPv4 and IPv6 addresses to be used. The addition of support for fully-qualified domain names to be used for the address brought about the renaming of the property.

Specifications

Specification Status Comment
Identifiers for WebRTC's Statistics APIThe definition of 'RTCIceCandidateStats.address' in that specification. Candidate Recommendation Initial specification.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
address Chrome

No support No

Edge

No support No

Firefox Full support 65


Full support 65


Full support 27

Alternate Name'

Alternate Name' Uses the non-standard name: ipAddress

IE

No support No

Opera

?

Safari

?

WebView Android

No support No

Chrome Android

No support No

Firefox Android Full support 65


Full support 65


Full support 27

Alternate Name'

Alternate Name' Uses the non-standard name: ipAddress

Opera Android

?

Safari iOS

?

Samsung Internet Android

No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Uses a non-standard name.'
Uses a non-standard name.