Skip to content

Commit

Permalink
Create property docs for the remaining properties
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee committed Dec 17, 2024
1 parent 3e210bb commit 4e630e7
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 21 deletions.
22 changes: 1 addition & 21 deletions files/en-us/web/api/rtctransportstats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,11 @@ These statistics can be obtained by iterating the {{domxref("RTCStatsReport")}}
- {{domxref("RTCTransportStats.selectedCandidatePairId", "selectedCandidatePairId")}} {{optional_inline}}
- : A string containing the unique identifier for the object that was inspected to produce the {{domxref("RTCIceCandidatePairStats")}} associated with this transport.
- {{domxref("RTCTransportStats.srtpCipher", "srtpCipher")}} {{optional_inline}}

- : A string indicating the descriptive name of the protection profile used for the [Secure Real-time Transport Protocol (SRTP)](/en-US/docs/Glossary/RTP) transport, as defined in the "Profile" column of the [IANA DTLS-SRTP protection profile registry](https://www.iana.org/assignments/srtp-protection/srtp-protection.xhtml#srtp-protection-1) and [RFC5764](https://www.rfc-editor.org/rfc/rfc5764.html#section-4.1.2).

For example `"AES_CM_128_HMAC_SHA1_80"` specifies the following profile, where `maximum_lifetime` is the maximum number of packets that can be protected by a single set of keys.

```plain
SRTP_AES128_CM_HMAC_SHA1_80
cipher: AES_128_CM
cipher_key_length: 128
cipher_salt_length: 112
maximum_lifetime: 2^31
auth_function: HMAC-SHA1
auth_key_length: 160
auth_tag_length: 80
```
- : A string indicating the descriptive name of the protection profile used for the [Secure Real-time Transport Protocol (SRTP)](/en-US/docs/Glossary/RTP) transport.
- {{domxref("RTCTransportStats.tlsVersion", "tlsVersion")}} {{optional_inline}}
- : A string containing the negotiated TLS version.
This is present for DTLS transports, and only exists after DTLS has been negotiated.

The value comes from the DTLS handshake `ServerHello.version`, and is represented as four upper case hexadecimal digits, where the digits represent the two bytes of the version.
Note however that the bytes might not map directly to version numbers.
For example, DTLS represents version 1.2 as `'FEFD'` which numerically is `{254, 253}`.
### Common instance properties

The following properties are common to all WebRTC statistics objects.
Expand Down
23 changes: 23 additions & 0 deletions files/en-us/web/api/rtctransportstats/packetsreceived/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "RTCTransportStats: packetsReceived property"
short-title: packetsReceived
slug: Web/API/RTCTransportStats/packetsReceived
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.packetsReceived
---

{{APIRef("WebRTC")}}

The **`packetsReceived`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the total number of packets received on this transport.

## Value

A positive integer indicating the number of packets received on the transport.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
23 changes: 23 additions & 0 deletions files/en-us/web/api/rtctransportstats/packetssent/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "RTCTransportStats: packetsSent property"
short-title: packetsSent
slug: Web/API/RTCTransportStats/packetsSent
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.packetsSent
---

{{APIRef("WebRTC")}}

The **`packetsSent`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the total number of packets sent over this transport.

## Value

A positive integer indicating the number of packets sent on the transport.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
25 changes: 25 additions & 0 deletions files/en-us/web/api/rtctransportstats/remotecertificateid/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "RTCTransportStats: remoteCertificateId property"
short-title: remoteCertificateId
slug: Web/API/RTCTransportStats/remoteCertificateId
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.remoteCertificateId
---

{{APIRef("WebRTC")}}

The **`remoteCertificateId`** property of the {{domxref("RTCTransportStats")}} dictionary is a string that indicates the id of the remote certificate used by this {{domxref("RTCIceTransport")}}.

It is only present for DTLS transports, and after DTLS has been negotiated.

## Value

A string that containing the id of the remote certificate used by this transport.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "RTCTransportStats: selectedCandidatePairChanges property"
short-title: selectedCandidatePairChanges
slug: Web/API/RTCTransportStats/selectedCandidatePairChanges
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.selectedCandidatePairChanges
---

{{APIRef("WebRTC")}}

The **`selectedCandidatePairChanges`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the total number of times that the selected candidate pair of this transport has changed.

## Value

A positive integer that is initially zero and increases whenever a candidate pair selected or lost.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "RTCTransportStats: selectedCandidatePairId property"
short-title: selectedCandidatePairId
slug: Web/API/RTCTransportStats/selectedCandidatePairId
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.selectedCandidatePairId
---

{{APIRef("WebRTC")}}

The **`selectedCandidatePairId`** property of the {{domxref("RTCTransportStats")}} dictionary represents the unique identifier for the candidate pair stats associated with this transport.

## Value

A string that contains the unique identifier for the object that was inspected to produce the {{domxref("RTCIceCandidatePairStats")}} associated with this transport.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
42 changes: 42 additions & 0 deletions files/en-us/web/api/rtctransportstats/srtpcipher/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "RTCTransportStats: srtpCipher property"
short-title: srtpCipher
slug: Web/API/RTCTransportStats/srtpCipher
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.srtpCipher
---

{{APIRef("WebRTC")}}

The **`srtpCipher`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the descriptive name of the protection profile used for the [Secure Real-time Transport Protocol (SRTP)](/en-US/docs/Glossary/RTP) transport.

## Value

A string that indicates the descriptive name of the SRTP protection profile.

Values are defined in the "Profile" column of the [IANA DTLS-SRTP protection profile registry](https://www.iana.org/assignments/srtp-protection/srtp-protection.xhtml#srtp-protection-1) and {{rfc("5764","", "4.1.2")}}.

## Examples

### SRTP_AES128_CM_HMAC_SHA1_80

`"SRTP_AES128_CM_HMAC_SHA1_80"` is the descriptive name of the following profile, where `maximum_lifetime` is the maximum number of packets that can be protected by a single set of keys.

```plain
SRTP_AES128_CM_HMAC_SHA1_80
cipher: AES_128_CM
cipher_key_length: 128
cipher_salt_length: 112
maximum_lifetime: 2^31
auth_function: HMAC-SHA1
auth_key_length: 160
auth_tag_length: 80
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
29 changes: 29 additions & 0 deletions files/en-us/web/api/rtctransportstats/tlsversion/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "RTCTransportStats: tlsVersion property"
short-title: tlsVersion
slug: Web/API/RTCTransportStats/tlsVersion
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_transport.tlsVersion
---

{{APIRef("WebRTC")}}

The **`tlsVersion`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the negotiated TLS version of an underlying DTLS transport.

It is only present for DTLS transports, and only exists after DTLS has been negotiated.

The value comes from the DTLS handshake `ServerHello.version`, and is represented as four upper case hexadecimal digits, where the digits represent the two bytes of the version.
Note however that the bytes might not map directly to version numbers.
For example, DTLS represents version 1.2 as `'FEFD'` which numerically is `{254, 253}`.

## Value

A string that indicates the negotiated DTS transport.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

0 comments on commit 4e630e7

Please sign in to comment.