From d5f6dd6b7f6653facfb468516ef657a2d4d5180c Mon Sep 17 00:00:00 2001 From: MDN Date: Thu, 3 Jun 2021 01:40:04 +0000 Subject: [CRON] sync translated content --- .../getdefaulticeservers/index.html | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 files/zh-cn/web/api/rtcpeerconnection/getdefaulticeservers/index.html (limited to 'files/zh-cn/web') diff --git a/files/zh-cn/web/api/rtcpeerconnection/getdefaulticeservers/index.html b/files/zh-cn/web/api/rtcpeerconnection/getdefaulticeservers/index.html deleted file mode 100644 index 96c8496248..0000000000 --- a/files/zh-cn/web/api/rtcpeerconnection/getdefaulticeservers/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: RTCPeerConnection.getDefaultIceServers() -slug: Web/API/RTCPeerConnection/getDefaultIceServers -translation_of: Web/API/RTCPeerConnection/getDefaultIceServers ---- -

{{APIRef("WebRTC")}}{{SeeCompatTable}}

- -

{{domxref("RTCPeerConnection")}} 接口的方法 getDefaultIceServers() 返回一个基于  {{domxref("RTCIceServer")}} 字典的对象数组。如果在 {{domxref("RTCPeerConnection")}} 的 {{domxref("RTCConfiguration")}} 中没有设置,该数组指向浏览器缺省使用的ICE servers,前提是浏览器确实存在缺省的ICE servers。然而,浏览器完全不必提供任何的缺省ICE Servers。

- -

语法

- -
 var defaultIceServers = RTCPeerConnection.getDefaultIceServers();
- -

返回值

- -

一个 ICE servers 的数组,以基于 {{domxref("RTCIceServer")}} 的对象组成,当没有在 {{domxref("RTCPeerConnection")}} 的设置中进行设置时,浏览器将使用它们。如果浏览器没有提供缺省值,将返回一个空数组,该属性的值永远不是 null

- -

例子

- -
var pc = new RTCPeerConnection();
-var iceServers = pc.getDefaultIceServers();
-
-if (iceServers.length === 0) {
-  // Deal with the lack of default ICE servers, possibly by using our own defaults
-}
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
WebRTC Extensions
- -

Browser compatibility

- - - -

{{Compat("api.RTCPeerConnection.getDefaultIceServers")}}

- -

See also

- - -- cgit v1.2.3-54-g00ecf