From 93e95b6c64491414423036bd1faacf15d8c92ef5 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 10 Dec 2024 16:22:08 +1100 Subject: [PATCH 1/7] bytesReceived, bytesSent properties --- .../rtctransportstats/bytesreceived/index.md | 25 +++++++++++++++++++ .../api/rtctransportstats/bytessent/index.md | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 files/en-us/web/api/rtctransportstats/bytesreceived/index.md create mode 100644 files/en-us/web/api/rtctransportstats/bytessent/index.md diff --git a/files/en-us/web/api/rtctransportstats/bytesreceived/index.md b/files/en-us/web/api/rtctransportstats/bytesreceived/index.md new file mode 100644 index 000000000000000..290609912a7d60f --- /dev/null +++ b/files/en-us/web/api/rtctransportstats/bytesreceived/index.md @@ -0,0 +1,25 @@ +--- +title: "RTCTransportStats: bytesReceived property" +short-title: bytesReceived +slug: Web/API/RTCTransportStats/bytesReceived +page-type: web-api-instance-property +browser-compat: api.RTCStatsReport.type_transport.bytesReceived +--- + +{{APIRef("WebRTC")}} + +The **`bytesReceived`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the total number of payload bytes received on this transport. + +Only data bytes are counted; overhead such as padding, headers, and so on are not included in this count. + +## Value + +A positive integer indicating the number of received payload bytes. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} diff --git a/files/en-us/web/api/rtctransportstats/bytessent/index.md b/files/en-us/web/api/rtctransportstats/bytessent/index.md new file mode 100644 index 000000000000000..d742b265c8627e9 --- /dev/null +++ b/files/en-us/web/api/rtctransportstats/bytessent/index.md @@ -0,0 +1,25 @@ +--- +title: "RTCTransportStats: bytesSent property" +short-title: bytesSent +slug: Web/API/RTCTransportStats/bytesSent +page-type: web-api-instance-property +browser-compat: api.RTCStatsReport.type_transport.bytesSent +--- + +{{APIRef("WebRTC")}} + +The **`bytesSent`** property of the {{domxref("RTCTransportStats")}} dictionary indicates the total number of payload bytes sent on this transport. + +Only data bytes are counted; overhead such as padding, headers, and so on are not included in this count. + +## Value + +A positive integer indicating the number of sent payload bytes. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} From 96a06cf16247796a225699a62ccefbe62cfc25a5 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 10 Dec 2024 16:22:51 +1100 Subject: [PATCH 2/7] dtlsCipher property --- .../api/rtctransportstats/dtlscipher/index.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 files/en-us/web/api/rtctransportstats/dtlscipher/index.md diff --git a/files/en-us/web/api/rtctransportstats/dtlscipher/index.md b/files/en-us/web/api/rtctransportstats/dtlscipher/index.md new file mode 100644 index 000000000000000..a70c167fef6e2a6 --- /dev/null +++ b/files/en-us/web/api/rtctransportstats/dtlscipher/index.md @@ -0,0 +1,26 @@ +--- +title: "RTCTransportStats: dtlsCipher property" +short-title: dtlsCipher +slug: Web/API/RTCTransportStats/dtlsCipher +page-type: web-api-instance-property +browser-compat: api.RTCStatsReport.type_transport.dtlsCipher +--- + +{{APIRef("WebRTC")}} + +The **`dtlsCipher`** property of the {{domxref("RTCTransportStats")}} dictionary is a string that indicates the descriptive name of the cipher suite used for the DTLS transport. + +Allowed names are defined in the "Description" column of the [TLS Cipher Suites](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4) section in the _IANA cipher suite registry_. +For example `"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"`. + +## Value + +A string indicating the name of the DTLS cipher. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} From efece9e5a4c9955d42fde7b3a3bbbfaa2f2b0525 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 10 Dec 2024 16:34:15 +1100 Subject: [PATCH 3/7] dtlsRole property --- .../api/rtctransportstats/dtlsrole/index.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 files/en-us/web/api/rtctransportstats/dtlsrole/index.md diff --git a/files/en-us/web/api/rtctransportstats/dtlsrole/index.md b/files/en-us/web/api/rtctransportstats/dtlsrole/index.md new file mode 100644 index 000000000000000..724b099c58812a8 --- /dev/null +++ b/files/en-us/web/api/rtctransportstats/dtlsrole/index.md @@ -0,0 +1,33 @@ +--- +title: "RTCTransportStats: dtlsRole property" +short-title: dtlsRole +slug: Web/API/RTCTransportStats/dtlsRole +page-type: web-api-instance-property +browser-compat: api.RTCStatsReport.type_transport.dtlsRole +--- + +{{APIRef("WebRTC")}} + +The **`dtlsRole`** property of the {{domxref("RTCTransportStats")}} dictionary is a string that indicates the role of the associated {{domxref("RTCPeerConnection")}} in the DTLS negotiation. + +Specifically, whether it acted like a server and listened for connections, or like a client and initiated the connection, or that negotiation has not yet started. + +## Value + +A string indicating the DTLS role. +This will be one of: + +- `client` + - : The peer will initiate the DTLS handshake. +- `server` + - : The peer waited for the DTLS handshake. +- `unknown` + - : DTLS negotiation has not started. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} From 06c865233f1772aa95969584c9d3e4ead4f87edb Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 10 Dec 2024 17:12:11 +1100 Subject: [PATCH 4/7] dtlsState property --- .../api/rtctransportstats/dtlsrole/index.md | 2 +- .../api/rtctransportstats/dtlsstate/index.md | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 files/en-us/web/api/rtctransportstats/dtlsstate/index.md diff --git a/files/en-us/web/api/rtctransportstats/dtlsrole/index.md b/files/en-us/web/api/rtctransportstats/dtlsrole/index.md index 724b099c58812a8..dc1ec024052a8d8 100644 --- a/files/en-us/web/api/rtctransportstats/dtlsrole/index.md +++ b/files/en-us/web/api/rtctransportstats/dtlsrole/index.md @@ -18,7 +18,7 @@ A string indicating the DTLS role. This will be one of: - `client` - - : The peer will initiate the DTLS handshake. + - : The peer initiated the DTLS handshake. - `server` - : The peer waited for the DTLS handshake. - `unknown` diff --git a/files/en-us/web/api/rtctransportstats/dtlsstate/index.md b/files/en-us/web/api/rtctransportstats/dtlsstate/index.md new file mode 100644 index 000000000000000..c21dc8a46ddacb5 --- /dev/null +++ b/files/en-us/web/api/rtctransportstats/dtlsstate/index.md @@ -0,0 +1,34 @@ +--- +title: "RTCTransportStats: dtlsState property" +short-title: dtlsState +slug: Web/API/RTCTransportStats/dtlsState +page-type: web-api-instance-property +browser-compat: api.RTCStatsReport.type_transport.dtlsState +--- + +{{APIRef("WebRTC")}} + +The **`dtlsState`** property of the {{domxref("RTCTransportStats")}} dictionary is a string that indicates the current state of the underlying {{domxref("RTCDtlsTransport")}}. + +## Value + +This has the same values as the corresponding {{domxref("RTCDtlsTransport.state")}} property: + +- `new` + - : The initial state when DTLS has not started negotiating yet. +- `connecting` + - : DTLS is in the process of negotiating a secure connection and verifying the remote fingerprint. +- `connected` + - : DTLS has completed negotiation of a secure connection and verified the remote fingerprint. +- `closed` + - : The transport has been closed intentionally as the result of receipt of a `close_notify` alert, or calling {{DOMxRef("RTCPeerConnection.close()")}}. +- `failed` + - : The transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote fingerprint). + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} From 03875a105ee978e6167986789074220840b298b2 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 10 Dec 2024 17:12:44 +1100 Subject: [PATCH 5/7] RTCTransportStats - index - partial --- .../en-us/web/api/rtctransportstats/index.md | 59 +++++++------------ 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/files/en-us/web/api/rtctransportstats/index.md b/files/en-us/web/api/rtctransportstats/index.md index 3b36f88c9a4ca57..55198f6b57c2a35 100644 --- a/files/en-us/web/api/rtctransportstats/index.md +++ b/files/en-us/web/api/rtctransportstats/index.md @@ -18,37 +18,22 @@ These statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} ## Instance properties -- `bytesReceived` {{optional_inline}} +- {{domxref("RTCTransportStats.bytesReceived", "bytesReceived")}} {{optional_inline}} - : The total number of payload bytes received on this transport (bytes received, not including headers, padding or ICE connectivity checks). -- `bytesSent` {{optional_inline}} +- {{domxref("RTCTransportStats.bytesSent", "bytesSent")}} {{optional_inline}} - : The total number of payload bytes sent on this transport (bytes sent, not including headers, padding or ICE connectivity checks). -- `dtlsCipher` {{optional_inline}} - - : A string indicating the name of the cipher suite used for the DTLS transport, as defined in the "Description" column of the [TLS Cipher Suites](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4) section in the _IANA cipher suite registry_. - For example `"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"`. -- `dtlsRole` {{optional_inline}} {{experimental_inline}} - - - : The DTLS role of the associated {{domxref("RTCPeerConnection")}}. - This is one of: - - - `client` - - `server` - - `unknown` (before the DTLS negotiation starts). - -- `dtlsState` - +- {{domxref("RTCTransportStats.dtlsCipher", "dtlsCipher")}} {{optional_inline}} + - : A string indicating the name of the cipher suite used for the DTLS transport, such as `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`. +- {{domxref("RTCTransportStats.dtlsRole", "dtlsRole")}} {{optional_inline}} {{experimental_inline}} + - : A string indicating the DTLS role of the associated {{domxref("RTCPeerConnection")}}. + This is one of: `client`, `server`, `unknown` (before the DTLS negotiation starts). +- {{domxref("RTCTransportStats.dtlsState", "dtlsState")}} - : A string indicating the current {{domxref("RTCDtlsTransport.state","state")}} of the underlying {{domxref("RTCDtlsTransport")}}. - This is one of: - - - [`new`](/en-US/docs/Web/API/RTCDtlsTransport/state#new) - - [`connecting`](/en-US/docs/Web/API/RTCDtlsTransport/state#connecting) - - [`connected`](/en-US/docs/Web/API/RTCDtlsTransport/state#connected) - - [`closed`](/en-US/docs/Web/API/RTCDtlsTransport/state#closed) - - [`failed`](/en-US/docs/Web/API/RTCDtlsTransport/state#failed) - -- `iceLocalUsernameFragment` {{optional_inline}} {{experimental_inline}} + This is one of: `new`, `connecting`, `connected`, `closed`, `failed`. +- {{domxref("RTCTransportStats.iceLocalUsernameFragment", "iceLocalUsernameFragment")}} {{optional_inline}} {{experimental_inline}} - : A string indicating the local username fragment used in message validation procedures for this transport. This is the same value as the local {{domxref("RTCIceCandidate.usernameFragment")}}, and will change if the connection is renegotiated. -- `iceRole` {{optional_inline}} {{experimental_inline}} +- {{domxref("RTCTransportStats.iceRole", "iceRole")}} {{optional_inline}} {{experimental_inline}} - : A string indicating the [ICE `role`](/en-US/docs/Web/API/RTCIceTransport/role) of the underlying {{domxref("RTCDtlsTransport.iceTransport")}}. This is one of: @@ -57,7 +42,7 @@ These statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} - [`controlling`](/en-US/docs/Web/API/RTCIceTransport/role#controlling) - [`unknown`](/en-US/docs/Web/API/RTCIceTransport/role#unknown) -- `iceState` {{optional_inline}} {{experimental_inline}} +- {{domxref("RTCTransportStats.iceState", "iceState")}} {{optional_inline}} {{experimental_inline}} - : A string indicating the current {{domxref("RTCIceTransport.state","state")}} of the underlying {{domxref("RTCIceTransport")}}. This is one of: @@ -70,22 +55,22 @@ These statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} - [`failed`](/en-US/docs/Web/API/RTCIceTransport/state#failed) - [`closed`](/en-US/docs/Web/API/RTCIceTransport/state#closed) -- `selectedCandidatePairId` {{optional_inline}} - - : A string containing the unique identifier for the object that was inspected to produce the {{domxref("RTCIceCandidatePairStats")}} associated with this transport. -- `localCertificateId` {{optional_inline}} +- {{domxref("RTCTransportStats.localCertificateId", "localCertificateId")}} {{optional_inline}} - : A string containing the id of the local certificate used by this transport. Only present for DTLS transports, and after DTLS has been negotiated. -- `packetsSent` {{optional_inline}} {{experimental_inline}} - - : The total number of packets sent over this transport. -- `packetsReceived` {{optional_inline}} {{experimental_inline}} +- {{domxref("RTCTransportStats.packetsReceived", "packetsReceived")}} {{optional_inline}} {{experimental_inline}} - : The total number of packets received on this transport. -- `remoteCertificateId` {{optional_inline}} +- {{domxref("RTCTransportStats.packetsSent", "packetsSent")}} {{optional_inline}} {{experimental_inline}} + - : The total number of packets sent over this transport. +- {{domxref("RTCTransportStats.remoteCertificateId", "remoteCertificateId")}} {{optional_inline}} - : A string containing the id or the remote certificate used by this transport. Only present for DTLS transports, and after DTLS has been negotiated. -- `selectedCandidatePairChanges` {{optional_inline}} +- {{domxref("RTCTransportStats.selectedCandidatePairChanges", "selectedCandidatePairChanges")}} {{optional_inline}} - : The number of times that the selected candidate pair of this transport has changed. The value is initially zero and increases whenever a candidate pair selected or lost. -- `srtpCipher` {{optional_inline}} +- {{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). @@ -102,7 +87,7 @@ These statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} auth_tag_length: 80 ``` -- `tlsVersion` {{optional_inline}} +- {{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. From f3253761a8c97c02b9bddc0bec40a1a3db84603c Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 13 Dec 2024 16:27:25 +1100 Subject: [PATCH 6/7] RTCTransportStats.iceLocalUsernameFragment --- .../icelocalusernamefragment/index.md | 28 +++++++++++++++++++ .../en-us/web/api/rtctransportstats/index.md | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md diff --git a/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md b/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md new file mode 100644 index 000000000000000..887947036cb8cbd --- /dev/null +++ b/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md @@ -0,0 +1,28 @@ +--- +title: "RTCTransportStats: iceLocalUsernameFragment property" +short-title: iceLocalUsernameFragment +slug: Web/API/RTCTransportStats/iceLocalUsernameFragment +page-type: web-api-instance-property +browser-compat: api.RTCStatsReport.type_transport.iceLocalUsernameFragment +--- + +{{APIRef("WebRTC")}} + +The **`iceLocalUsernameFragment`** property of the {{domxref("RTCTransportStats")}} dictionary is a string that indicates the local username fragment ("ufrag" or "ice-ufrag") that uniquely identifies the ICE interaction session managed by this transport. + +## Value + +A string containing the username fragment that uniquely identifies the ongoing ICE session on the transport. +The same fragment is used to identify the section for any communication with the STUN server. +The string may be up to 256 characters long, and has no default value. + +This has the same values as the corresponding local {{domxref("RTCIceCandidate.usernameFragment")}} property. +It will change if the connection is renegotiated, for example on ICE restart, or if {{domxref("RTCPeerConnection.setLocalDescription()")}} is called. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} diff --git a/files/en-us/web/api/rtctransportstats/index.md b/files/en-us/web/api/rtctransportstats/index.md index 55198f6b57c2a35..52586f74cd32272 100644 --- a/files/en-us/web/api/rtctransportstats/index.md +++ b/files/en-us/web/api/rtctransportstats/index.md @@ -31,7 +31,7 @@ These statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} - : A string indicating the current {{domxref("RTCDtlsTransport.state","state")}} of the underlying {{domxref("RTCDtlsTransport")}}. This is one of: `new`, `connecting`, `connected`, `closed`, `failed`. - {{domxref("RTCTransportStats.iceLocalUsernameFragment", "iceLocalUsernameFragment")}} {{optional_inline}} {{experimental_inline}} - - : A string indicating the local username fragment used in message validation procedures for this transport. + - : A string indicating the local username fragment that uniquely identifies the ICE interaction session managed by this transport. This is the same value as the local {{domxref("RTCIceCandidate.usernameFragment")}}, and will change if the connection is renegotiated. - {{domxref("RTCTransportStats.iceRole", "iceRole")}} {{optional_inline}} {{experimental_inline}} From 1dd103e3f13b59372bd993ad1a1a57d74e495dac Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 13 Dec 2024 16:44:06 +1100 Subject: [PATCH 7/7] RTCTransportStats.iceLocalUsernameFragment - fix typo --- .../web/api/rtctransportstats/icelocalusernamefragment/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md b/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md index 887947036cb8cbd..f21500917ee727e 100644 --- a/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md +++ b/files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md @@ -13,7 +13,7 @@ The **`iceLocalUsernameFragment`** property of the {{domxref("RTCTransportStats" ## Value A string containing the username fragment that uniquely identifies the ongoing ICE session on the transport. -The same fragment is used to identify the section for any communication with the STUN server. +The same fragment is used to identify the session for any communication with the STUN server. The string may be up to 256 characters long, and has no default value. This has the same values as the corresponding local {{domxref("RTCIceCandidate.usernameFragment")}} property.