v148 · Connectivity · demo
DataChannel Setup Wizard
Step through RTCPeerConnection data channel setup, inspect the live SDP offer, and run a loopback test — all in-page. Chrome 148 always negotiates data channels correctly even when no media tracks are added.
Setup Steps
idle
-
1Create RTCPeerConnection + data channelInstantiates
new RTCPeerConnection()and callscreateDataChannel('demo'). -
2Generate offer SDPCalls
createOffer()— the SDP will contain anm=applicationsection because a data channel was added. -
3Set local / remote descriptionsSets local description on the offerer, creates an answerer, sets remote/local on both.
-
4ICE gatheringExchange ICE candidates between both peer connections via trickle ICE.
-
5Data channel open — readyBoth sides see
channel.readyState === "open". Messages can flow.
Negotiation Modes — compare approaches
In-band negotiation (Chrome 148 always-on): The browser handles SCTP stream allocation automatically via DCEP (Data Channel Establishment Protocol). Works even when no media streams are added — Chrome 148 fixes a regression where data-channel-only connections could fail to negotiate. Just call
createDataChannel() and the SDP will include the m=application section. No extra signalling needed.
Live SDP Offer —
m=application section highlighted— click "Run Setup" to generate offer SDP —
Loopback Test — send messages between two in-page peer connections
— run setup first to open data channels —
see also
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗