Firefox Tomorrow

web api instance property

RTCDataChannel: priority property

View on MDN ↗

Limited availability

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 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

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

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

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also