From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/rtcstats/id/index.html | 47 +++++++++++++++++ files/zh-cn/web/api/rtcstats/index.html | 84 ++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 files/zh-cn/web/api/rtcstats/id/index.html create mode 100644 files/zh-cn/web/api/rtcstats/index.html (limited to 'files/zh-cn/web/api/rtcstats') 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 +--- +
{{APIRef("WebRTC")}}
+ +

{{domxref("RTCStats")}} 字典的 id 属性是一个字符串,用于唯一标识此 RTCStats 对象提供统计信息的对象。 使用 id, 可以关联两个或多个基于 RTCStats 的对象,以便随时监视给定 WebRTC 对象的统计信息,例如一个 {{Glossary("RTP")}} 流,{{domxref("RTCPeerConnection")}},或 {{domxref("RTCDataChannel")}}。

+ +

语法

+ +
var id = RTCStats.id;
+ +

+ +

一个 {{domxref("DOMString")}},用于唯一标识基于此 RTCStats 对象提供统计信息的对象。

+ +

ID 字符串的格式不是由规范定义的,因此无法可靠地对字符串的内容进行任何假设。也不能假设对于给定的对象类型,字符串的格式将保持不变。

+ +

规范

+ + + + + + + + + + + + + + +
标准状态说明
{{SpecName('WebRTC 1.0', '#dom-rtcstats-id', 'RTCStats.id')}}{{Spec2('WebRTC 1.0')}}初始定义
+ +

浏览器兼容性

+ + + +

{{Compat("api.RTCStats.id")}}

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 +--- +
{{APIRef("WebRTC")}}
+ +

The RTCStats dictionary is the basic statistics object used by WebRTC's statistics monitoring model, providing the properties required of all statistics data objects. Specific classes of statistic are defined as dictionaries based on RTCStats. For example, statistics about a received {{Glossary("RTP")}} stream are represented by {{domxref("RTCReceivedRtpStreamStats")}}.

+ +

Properties

+ +
+
{{domxref("RTCStats.id", "id")}}
+
A {{domxref("DOMString")}} which uniquely identifies the object which was inspected to produce this object based on RTCStats.
+
{{domxref("RTCStats.timestamp", "timestamp")}}
+
A {{domxref("DOMHighResTimeStamp")}} object indicating the time at which the sample was taken for this statistics object.
+
{{domxref("RTCStats.type", "type")}}
+
A {{domxref("DOMString")}} indicating the type of statistics the object contains, taken from the enum type {{domxref("RTCStatsType")}}.
+
+ +

The statistics type hierarchy

+ +

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 RTCStats dictionary, each layer adding more relevant information.

+ + + +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('WebRTC 1.0', '#dom-rtcstats', 'RTCStats') }}{{ Spec2('WebRTC 1.0') }}Initial specification.
+ +

Browser compatibility

+ + + +

{{Compat("api.RTCStats")}}

-- cgit v1.2.3-54-g00ecf