RTCDataChannel: priority property

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The read-only priority property of the RTCDataChannel interface returns a string indicating the priority of the data channel. The priority is assigned by the user agent at channel creation time based on the priority option in the dataChannelDict parameter passed to RTCPeerConnection.createDataChannel(), or from the remote peer for incoming data channels.

Value

A string indicating the priority of the data channel. Possible values are, in order from lowest to highest priority:

"very-low"

The data channel has a very low priority.

"low"

The data channel has a low priority. This is the default value.

"medium"

The data channel has a medium priority.

"high"

The data channel has a high priority.

Examples

Checking the priority of a data channel

js
const pc = new RTCPeerConnection();
const dc = pc.createDataChannel("my channel", { priority: "high" });

console.log(dc.priority); // "high"

Specifications

Specification
WebRTC Priority Control API
# dom-rtcdatachannel-priority

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
priority
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote No support
Opera – No support
Opera
footnote No support
Safari – Full support
Safari 15 (Release date: 2021-09-20)
footnote Full support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – Full support
WebView on iOS 15 (Release date: 2021-09-20)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also