address 特性为 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.

句法

candidateAddress = rtcIceCandidateStats.address;
					

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

  • 若值 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 用户代理 selects one, which is then used for the duration of ICE processing.

用法注意事项

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.

规范

规范 状态 注释
Identifiers for WebRTC's Statistics API
The definition of 'RTCIceCandidateStats.address' in that specification.
候选推荐 最初的规范。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
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 Edge No Firefox 65
65
27 Alternate Name
Alternate Name Uses the non-standard name: ipAddress
IE No Opera ? Safari ? WebView Android No Chrome Android No Firefox Android 65
65
27 Alternate Name
Alternate Name Uses the non-standard name: ipAddress
Opera Android ? Safari iOS ? Samsung Internet Android No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

使用非标名称。

元数据

  • 最后修改: