Skip to content

Commit

Permalink
RTCTransportStats.iceLocalUsernameFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee committed Dec 13, 2024
1 parent 03875a1 commit f325376
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
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 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}}
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtctransportstats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

Expand Down

0 comments on commit f325376

Please sign in to comment.