v160 · webrtc · removal
Deprecate and remove WebRTC peer connection method
The method is RTCPeerConnection.prototype.createDTMFSender(track) — a Blink-only, pre-spec way to send telephone keypad tones (DTMF) on a call. Chrome 160 removes it, with no deprecation period, as part of Interop 2026. The standard replacement has existed since 2017: every audio RTCRtpSender exposes the very same RTCDTMFSender as sender.dtmf. These demos probe the removal for real and run the replacement over a live two-peer loopback in this tab — no server, no microphone.
runtime_enabled_features.json5 on main has no DTMF-related entry and there is no chrome://flags switch; the API owners approved the removal “with a flag” that acts as a server-side kill switch, not a user opt-in. On Chrome 159 and earlier the probe honestly reports the method as present — use the migration shim page’s clearly labelled in-tab simulation to see what your code does on 160.
concepts
-
Removal probe
Is
createDTMFSendergone in this browser? Checks the prototype, then actually calls it on a live loopback call: either it returns anRTCDTMFSender(and we show it is the identical object assender.dtmf) or it throwsTypeError: not a function. -
DTMF keypad (the replacement)
A softphone keypad wired to
RTCRtpSender.dtmf.insertDTMF(): tap keys or dial a string, tune tone duration and gap, and watchtoneBuffer,tonechangeevents and the received audio level on the other peer. -
Tone-buffer inspector
The
RTCDTMFSendercontract, rule by rule, measured live:canInsertDTMFbefore negotiation and onrecvonly,InvalidStateError/InvalidCharacterError, duration and gap clamping, the two-second comma, buffer replacement, anddtmf === nullon video senders. -
Migration shim
Run legacy
pc.createDTMFSender(track)code against a simulated Chrome 160, install the shim posted on the blink-dev intent thread, and compare its exceptions against the native method case by case — then the two-line rewrite tosender.dtmf. -
IVR decoder
End-to-end proof: the second peer plays an automated phone menu and decodes the tones it receives with a Goertzel filter bank on the remote audio track — so you can see the replacement API actually puts DTMF on the wire.
the change
// Before — Blink-only, removed in Chrome 160:
const dtmf = pc.createDTMFSender(audioTrack);
// After — standard, works in every engine:
const sender = pc.getSenders().find(s => s.track === audioTrack);
const dtmf = sender.dtmf; // same RTCDTMFSender object
dtmf.ontonechange = (e) => console.log(e.tone || "(done)");
if (dtmf.canInsertDTMF) dtmf.insertDTMF("1234#", 100, 70);
On Chrome 159 and earlier, createDTMFSender(track) simply looks up the sender for track and returns its dtmf. Nothing is lost by switching: the tone engine, events and timing rules are identical. What changes on 160 is that the call throws TypeError: pc.createDTMFSender is not a function, so unguarded legacy code stops at that line.
references
- ChromeStatus entry
- blink-dev: Intent to Deprecate and Remove (with the migration shim)
- WebRTC 1.0 — Peer-to-peer DTMF (RTCRtpSender.dtmf / RTCDTMFSender)
- WebRTC 1.0 — DTMF example
- WPT: webrtc/historical.html?interop-2026
- crbug 553274713 — tracking bug
- Use counter 1642 (createDTMFSender usage)
- MDN: RTCRtpSender.dtmf
- Mozilla: DTMF now available in Firefox (migration notes)