-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTCTransportStats - updates #37158
Draft
hamishwillee
wants to merge
7
commits into
mdn:main
Choose a base branch
from
hamishwillee:RTCTransportStats_update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
RTCTransportStats - updates #37158
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
93e95b6
bytesReceived, bytesSent properties
hamishwillee 96a06cf
dtlsCipher property
hamishwillee efece9e
dtlsRole property
hamishwillee 06c8652
dtlsState property
hamishwillee 03875a1
RTCTransportStats - index - partial
hamishwillee f325376
RTCTransportStats.iceLocalUsernameFragment
hamishwillee 1dd103e
RTCTransportStats.iceLocalUsernameFragment - fix typo
hamishwillee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
files/en-us/web/api/rtctransportstats/bytesreceived/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 initiated the DTLS handshake. | ||
- `server` | ||
- : The peer waited for the DTLS handshake. | ||
- `unknown` | ||
- : DTLS negotiation has not started. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
28 changes: 28 additions & 0 deletions
28
files/en-us/web/api/rtctransportstats/icelocalusernamefragment/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 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. | ||
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, the spec says
it is not clear if that validation is something the browser does or the developer does (to me). I THINK that the fragment is used to associate the transport to the messages on it, so at this point the validation has already happened. i.e. that is of interest to browser developers, not end users.
I am not sure what a developer would do with this stat, though presumably they can map it to other stats that are part of the same session.