v160 · webrtc · inspection
Tone-buffer inspector
Migrating off createDTMFSender() means relying on the spec’s RTCDTMFSender rules directly. Each check below runs one of those rules on a real loopback call and records the browser’s actual behaviour — exceptions, normalisation, timing clamps, the comma pause, buffer replacement, and which senders get a DTMF sender at all. Every check can fail.
Timing checks measure the gap between successive
tonechange events with performance.now(); a busy device adds jitter, so the tolerances are generous and the raw numbers are always shown.No checks run yet.
the rules being tested
// WebRTC 1.0 §7.2 RTCDTMFSender
dtmf.canInsertDTMF // false until the transceiver currently sends
dtmf.insertDTMF(tones, duration = 100, interToneGap = 70)
// !canInsertDTMF → InvalidStateError
// char outside 0-9 A-D # * , → InvalidCharacterError
// tones uppercased into toneBuffer
// duration clamped to [40, 6000] ms; interToneGap at least 30 ms
// "," → 2000 ms pause
// a new call REPLACES whatever is still in toneBuffer
// tonechange fires per tone, then once with tone ""
sender.dtmf // null when the sender's kind is "video"