aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html')
-rw-r--r--files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html110
1 files changed, 110 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html b/files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html
new file mode 100644
index 0000000000..ce202a7d8f
--- /dev/null
+++ b/files/zh-cn/web/api/rtcpeerconnection/iceconnectionstate/index.html
@@ -0,0 +1,110 @@
+---
+title: RTCPeerConnection.iceConnectionState
+slug: Web/API/RTCPeerConnection/iceConnectionState
+translation_of: Web/API/RTCPeerConnection/iceConnectionState
+---
+<p>{{APIRef("WebRTC")}}{{SeeCompatTable}}</p>
+
+<p><code><strong>RTCPeerConnection.iceConnectionState</strong></code> 是一个只读属性,用于描述连接的ICE连接状态,返回值为枚举类型。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"> var state = <em>peerConnection</em>.iceConnectionState;</pre>
+
+<h3 id="返回值">返回值</h3>
+
+<p><code>RTCIceConnectionState的返回值为下面列举中的一种</code>:</p>
+
+<ul>
+ <li><code>"new"</code>: ICE 代理正在搜集地址或者等待远程候选可用。</li>
+ <li><code>"checking"</code>: ICE 代理已收到至少一个远程候选,并进行校验,无论此时是否有可用连接。同时可能在继续收集候选。</li>
+ <li><code>"connected"</code>: ICE代理至少对每个候选发现了一个可用的连接,此时仍然会继续测试远程候选以便发现更优的连接。同时可能在继续收集候选。</li>
+ <li><code>"completed"</code>: ICE代理已经发现了可用的连接,不再测试远程候选。</li>
+ <li><code>"failed"</code>: ICE候选测试了所有远程候选没有发现匹配的候选。也可能有些候选中发现了一些可用连接。</li>
+ <li><code>"disconnected"</code>: 测试不再活跃,这可能是一个暂时的状态,可以自我恢复。</li>
+ <li><code>"closed"</code>: ICE代理关闭,不再应答任何请求。</li>
+</ul>
+
+<h2 id="例子">例子</h2>
+
+<pre>var pc = new RTCPeerConnection();
+var state = pc.iceConnectionState;</pre>
+
+<h2 id="Specifications" name="Specifications">规范</h2>
+
+<table class="standard-table" style="height: 49px; width: 1000px;">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('WebRTC 1.0', '#widl-RTCPeerConnection-iceConnectionState', 'RTCPeerConnection.iceConnectionState') }}</td>
+ <td>{{ Spec2('WebRTC 1.0') }}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容">浏览器兼容</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatVersionUnknown() }} [1]</td>
+ <td>{{ CompatVersionUnknown }} [1]</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] Though this property is not prefixed, the interface it belongs to is.</p>
+
+<h2 id="参考文档">参考文档</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/Guide/API/WebRTC">WebRTC</a></li>
+</ul>