RTCIceCandidateStats.address - Web APIs 编辑

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

SpecificationStatusComment
Identifiers for WebRTC's Statistics API
The definition of 'RTCIceCandidateStats.address' in that specification.
Candidate RecommendationInitial specification.

Browser compatibility

BCD tables only load in the browser

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:74 次

字数:2865

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文