Skip to content

Commit 4d5b523

Browse files
author
Juhi Shah
committed
Add ICE definition, Update API doc and remove Appendix
1 parent 9149cd5 commit 4d5b523

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

specs/WebRtcPortConfiguration.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ WebRTC Port Range Configuration
66
WebRTC by default allocates ports dynamically from the system’s ephemeral range.
77
In enterprise or testing environments, developers often need deterministic or firewall-friendly port allocation.
88

9-
This API enables developers to configure the port range WebRTC uses for ICE candidates and media connections.
9+
This API enables developers to configure the port range WebRTC uses for [ICE](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Protocols#ice) candidates and media connections.
10+
1011
The initial support is for **UDP**, with room to extend to **TCP** in the future.
1112

1213
By exposing a `WebRtcPortConfiguration` object on `CoreWebView2EnvironmentOptions`, developers can set and retrieve the port range before creating the WebView2 environment.
1314

1415
# Conceptual pages (How To)
1516

16-
Developers can use this API to restrict WebRTC’s UDP ports to a specific range.
17+
Developers can use this API to restrict WebRTC’s UDP ports to a specific range which WebRTC uses for ICE candidate and media connections.
18+
19+
ICE stands for **Interactive Connectivity Establishment**. It is a standard method of NAT traversal used in WebRTC. It is defined in [IETF RFC 5245](https://datatracker.ietf.org/doc/html/rfc5245). ICE deals with the process of connecting media through NATs by conducting connectivity checks.
1720

1821
Common scenarios:
1922
- Configure ports for **enterprise firewall compliance**.
@@ -203,10 +206,6 @@ public enum CoreWebView2WebRtcProtocolKind
203206
/// UDP protocol for WebRTC media and ICE candidates.
204207
/// </summary>
205208
Udp = 0,
206-
/// <summary>
207-
/// TCP protocol for WebRTC media and ICE candidates (future support).
208-
/// </summary>
209-
Tcp = 1,
210209
}
211210

212211
/// <summary>
@@ -222,8 +221,9 @@ public interface ICoreWebView2WebRtcPortConfiguration
222221
/// This method allows configuring a specific port range that WebRTC will use
223222
/// for ICE candidates and media connections for the specified protocol.
224223
///
225-
/// protocol specifies the WebRTC protocol type (UDP, TCP, etc.).
224+
/// protocol specifies the WebRTC protocol type.
226225
/// minPort and maxPort must be in the range 1025-65535 (inclusive).
226+
/// Calls with invalid ranges return E_INVALIDARG.
227227
/// minPort must be less than or equal to maxPort.
228228
/// If minPort equals maxPort, it represents a single port.
229229
///
@@ -257,14 +257,10 @@ public interface ICoreWebView2EnvironmentOptions
257257
/// Gets the WebRTC port configuration object for configuring custom port ranges.
258258
/// This configuration can be used to set and retrieve port range configuration
259259
/// that WebRTC will use for ICE candidates and media connections.
260+
/// If no range is configured, WebRTC uses the OS ephemeral port range.
261+
/// Configuration must be completed before the environment is created. Once the environment is
262+
/// setup, the port range can not be customized.
260263
/// </summary>
261264
ICoreWebView2WebRtcPortConfiguration WebRtcPortConfiguration { get; }
262265
}
263-
```
264-
265-
# Appendix
266-
267-
Validation rules: Ports must be within 1025–65535. Calls with invalid ranges return E_INVALIDARG.
268-
Default behavior: If no range is configured, WebRTC uses the OS ephemeral port range.
269-
Thread safety: Configuration must be completed before the environment is created.
270-
Extensibility: API is protocol-based to allow future support (e.g., TCP).
266+
```

0 commit comments

Comments
 (0)