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
  1. 1
    Create RTCPeerConnection + data channel
    Instantiates new RTCPeerConnection() and calls createDataChannel('demo').
  2. 2
    Generate offer SDP
    Calls createOffer() — the SDP will contain an m=application section because a data channel was added.
  3. 3
    Set local / remote descriptions
    Sets local description on the offerer, creates an answerer, sets remote/local on both.
  4. 4
    ICE gathering
    Exchange ICE candidates between both peer connections via trickle ICE.
  5. 5
    Data channel open — ready
    Both 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 ↗