diff options
Diffstat (limited to 'files/zh-cn/web/api/rtcstats')
-rw-r--r-- | files/zh-cn/web/api/rtcstats/id/index.html | 47 | ||||
-rw-r--r-- | files/zh-cn/web/api/rtcstats/index.html | 84 |
2 files changed, 131 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/rtcstats/id/index.html b/files/zh-cn/web/api/rtcstats/id/index.html new file mode 100644 index 0000000000..1d4ae33a15 --- /dev/null +++ b/files/zh-cn/web/api/rtcstats/id/index.html @@ -0,0 +1,47 @@ +--- +title: RTCStats.id +slug: Web/API/RTCStats/id +tags: + - RTCStats + - WebRTC + - id + - 属性 + - 统计信息 +translation_of: Web/API/RTCStats/id +--- +<div>{{APIRef("WebRTC")}}</div> + +<p><span class="seoSummary">{{domxref("RTCStats")}} 字典的 <strong><code>id</code></strong> 属性是一个字符串,用于唯一标识此 <code>RTCStats</code> 对象提供统计信息的对象。</span> 使用 <code>id</code>, 可以关联两个或多个基于 <code>RTCStats</code> 的对象,以便随时监视给定 WebRTC 对象的统计信息,例如一个 {{Glossary("RTP")}} 流,{{domxref("RTCPeerConnection")}},或 {{domxref("RTCDataChannel")}}。</p> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox notranslate">var <em>id</em> = <em>RTCStats</em>.id;</pre> + +<h3 id="值">值</h3> + +<p>一个 {{domxref("DOMString")}},用于唯一标识基于此 <code>RTCStats</code> 对象提供统计信息的对象。</p> + +<p>ID 字符串的格式不是由规范定义的,因此无法可靠地对字符串的内容进行任何假设。也不能假设对于给定的对象类型,字符串的格式将保持不变。</p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">标准</th> + <th scope="col">状态</th> + <th scope="col">说明</th> + </tr> + <tr> + <td>{{SpecName('WebRTC 1.0', '#dom-rtcstats-id', 'RTCStats.id')}}</td> + <td>{{Spec2('WebRTC 1.0')}}</td> + <td>初始定义</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<div class="hidden">此页面的兼容性表是根据结构化数据生成的。如果您想贡献数据,请查看 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 并给我们发送 pull request。</div> + +<p>{{Compat("api.RTCStats.id")}}</p> diff --git a/files/zh-cn/web/api/rtcstats/index.html b/files/zh-cn/web/api/rtcstats/index.html new file mode 100644 index 0000000000..9c95acc3b2 --- /dev/null +++ b/files/zh-cn/web/api/rtcstats/index.html @@ -0,0 +1,84 @@ +--- +title: RTCStats +slug: Web/API/RTCStats +tags: + - API + - Dictionary + - NeedsTranslation + - RTCStats + - Reference + - Report + - Statistics + - Stats + - TopicStub + - WebRTC + - rtc +translation_of: Web/API/RTCStats +--- +<div>{{APIRef("WebRTC")}}</div> + +<p><span class="seoSummary">The <strong><code>RTCStats</code></strong> dictionary is the basic statistics object used by WebRTC's statistics monitoring model, providing the properties required of all statistics data objects.</span> Specific classes of statistic are defined as dictionaries based on <code>RTCStats</code>. For example, statistics about a received {{Glossary("RTP")}} stream are represented by {{domxref("RTCReceivedRtpStreamStats")}}.</p> + +<h2 id="Properties">Properties</h2> + +<dl> + <dt>{{domxref("RTCStats.id", "id")}}</dt> + <dd>A {{domxref("DOMString")}} which uniquely identifies the object which was inspected to produce this object based on <code>RTCStats</code>.</dd> + <dt>{{domxref("RTCStats.timestamp", "timestamp")}}</dt> + <dd>A {{domxref("DOMHighResTimeStamp")}} object indicating the time at which the sample was taken for this statistics object.</dd> + <dt>{{domxref("RTCStats.type", "type")}}</dt> + <dd>A {{domxref("DOMString")}} indicating the type of statistics the object contains, taken from the enum type {{domxref("RTCStatsType")}}.</dd> +</dl> + +<h2 id="The_statistics_type_hierarchy">The statistics type hierarchy</h2> + +<p>The various dictionaries that are used to define the contents of the objects that contain each of the various types of statistics for WebRTC are structured in such a way that they build upon the core <code>RTCStats</code> dictionary, each layer adding more relevant information.</p> + +<ul> + <li>{{domxref("RTCStats")}} is the foundation of all WebRTC statistics objects + <ul> + <li>{{domxref("RTCRtpStreamStats")}} adds to <code>RTCStats</code> information that applies to all RTP endpoints (that is, both local and remote endpoints, and regardless of whether the endpoint is a sender or a receiver) + + <ul> + <li>{{domxref("RTCReceivedRtpStreamStats")}} further adds statistics measured at the receiving end of an RTP stream, regardless of whether it's local or remote. + <ul> + <li>{{domxref("RTCInboundRtpStreamStats")}} contains statistics that can only be measured on a receiver at the local end of the RTP connection.</li> + <li>{{domxref("RTCOutboundRtpStreamStats")}} contains statistics related to the receiver at the remote end of the RTP stream.</li> + </ul> + </li> + <li>{{domxref("RTCSentRtpStreamStats")}} offers statistics related to the sending end of an RTP stream. + <ul> + <li>{{domxref("RTCOutboundRtpStreamStats")}} contains statistics about the local sending endpoint of an RTP stream.</li> + <li>{{domxref("RTCRemoteOutboundRtpStreamStats")}} holds statistics related to the remote sending end an RTP stream.</li> + </ul> + </li> + </ul> + </li> + </ul> + </li> +</ul> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <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-rtcstats', 'RTCStats') }}</td> + <td>{{ Spec2('WebRTC 1.0') }}</td> + <td>Initial specification.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + + + +<p>{{Compat("api.RTCStats")}}</p> |