RTCDataChannel: ordered property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
The read-onlyRTCDataChannel
propertyordered
indicateswhether or not the data channel guarantees in-order delivery of messages;the default istrue
,which indicates that the data channel is indeed ordered.This is set when theRTCDataChannel
is created,by setting theordered
propertyon the object passed asRTCPeerConnection.createDataChannel()
'soptions
parameter.
In this article
Value
A boolean value which istrue
if in-order delivery isguaranteed and is otherwisefalse
.
Example
js
const pc = new RTCPeerConnection();const dc = pc.createDataChannel("my channel");if (!dc.ordered) { // Handle unordered messaging}
Specifications
Specification |
---|
WebRTC: Real-Time Communication in Browsers> # dom-datachannel-ordered> |
Browser compatibility
Loading…