RTCDataChannel.priority
- Category
- WebRTC
- Type
- New or changed feature
- Status
- No active development (Chrome No active development)
- Intent stage
- None
WPT details: Tests are verifying that the negotiation of data channels propagates the priority field as mandated in the DCEP specification (rfc8832). The tests cannot verify that the underlying transport is respecting the priorities reliably.
Summary
Many applications have multiple media flows of the same data type and often some of the flows are more important than others. The priority setting can be used to indicate the relative priority of various flows. The priority API allows the JavaScript applications to tell the browser whether a particular media flow is high, medium, low or of very low importance to the application.
Motivation
The WebRTC specification mandates that the underlying SCTP implementation used for data channels uses a Weighted Fair Queue scheduler (see https://www.rfc-editor.org/rfc/rfc8831#section-6.4). A WFQ scheduler needs to know the relative priority of the different data streams in order to be effective, which is taken from the RTCDataChannelInit.priority and read back from the RTCDataChannel.priority field.
Standards & signals
- Specification: https://w3c.github.io/webrtc-priority/#datachannel
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=rtcdatachannel-priority
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+RTCDataChannel.priority
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=RTCDataChannel.priority
- Baseline status: https://webstatus.dev/?q=RTCDataChannel.priority