aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/rtcpeerconnection/getreceivers
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/getreceivers
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/getreceivers')
-rw-r--r--files/zh-cn/web/api/rtcpeerconnection/getreceivers/index.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/rtcpeerconnection/getreceivers/index.html b/files/zh-cn/web/api/rtcpeerconnection/getreceivers/index.html
new file mode 100644
index 0000000000..4f59be48af
--- /dev/null
+++ b/files/zh-cn/web/api/rtcpeerconnection/getreceivers/index.html
@@ -0,0 +1,60 @@
+---
+title: RTCPeerConnection.getReceivers()
+slug: Web/API/RTCPeerConnection/getReceivers
+tags:
+ - Media
+ - RTCPeerConnection
+ - WebRTC
+ - getReceivers
+translation_of: Web/API/RTCPeerConnection/getReceivers
+---
+<div>{{APIRef("WebRTC")}}{{SeeCompatTable}}</div>
+
+<p><code><strong>RTCPeerConnection.getReceivers()</strong></code> 方法返回一个 {{domxref("RTCRtpReceiver")}} 对象的数组, 每个RTCRtpReceiver对象代表了一个RTP receiver。每个RTP receiver管理在一个 {{domxref("RTCPeerConnection")}} 上的 {{domxref("MediaStreamTrack")}} 的数据的接收与解码。</p>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="syntaxbox notranslate">var <em>receivers</em> = <em>rtcPeerConnection</em>.getReceivers();
+</pre>
+
+<h3 id="返回值">返回值</h3>
+
+<p>一个 {{domxref("RTCRtpReceiver")}} 数组,一个对象就是连接上的一个轨道(track)。若连接上没有RTP receiver,则数组为空。</p>
+
+<p>规范没有定义返回的<font face="consolas, Liberation Mono, courier, monospace">RTCRtpReceiver实例的顺序,所以两次调用</font> <code>getReceivers()</code> 返回的顺序可能是不同的。</p>
+
+<h2 id="Example" name="Example">例子</h2>
+
+<p>待定</p>
+
+<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', '#dom-peerconnection-getreceivers', 'RTCPeerConnection.getReceivers()') }}</td>
+ <td>{{ Spec2('WebRTC 1.0') }}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.RTCPeerConnection.getReceivers")}}</p>
+
+<h2 id="参阅">参阅</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/Guide/API/WebRTC_API">WebRTC</a></li>
+ <li>{{domxref("RTCRtpSender")}}</li>
+</ul>