files/en-us/web/api/rtcdatachannel/priority/index.md
{{APIRef("WebRTC")}}{{SeeCompatTable}}
The read-only priority property of the {{domxref("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 {{domxref("RTCPeerConnection.createDataChannel()")}}, or from the remote peer for incoming data channels.
A string indicating the priority of the data channel. Possible values are, in order from lowest to highest priority:
"very-low"
"low"
"medium"
"high"
const pc = new RTCPeerConnection();
const dc = pc.createDataChannel("my channel", { priority: "high" });
console.log(dc.priority); // "high"
{{Specifications}}
{{Compat}}