Sending of the tones is performed asynchronously,
tonechange events sent to the
RTCDTMFSender every time
a tone starts or ends.
As long as the connection is active, you can send tones at any time. Calling
insertDTMF() replaces any already-pending tones from the
You can abort sending queued tones by specifying an empty string (
"") as the set of tones to play.
insertDTMF() replaces the tone buffer, in order to add to the DTMF tones being played, it is necessary to call
insertDTMF with a string containing both the remaining tones (stored in the
toneBuffer) and the new tones appended together.
RTCDTMFSender.insertDTMF(tones[, duration[, interToneGap]]);
DOMStringcontaining the DTMF codes to be transmitted to the recipient. Specifying an empty string as the
tonesparameter clears the tone buffer, aborting any currently queued tones. A "," character inserts a two second delay.
The amount of time, in milliseconds, that each DTMF tone should last. This value must be between 40 ms and 6000 ms (6 seconds), inclusive. The default is 100 ms.
The length of time, in milliseconds, to wait between tones. The browser will enforce a minimum value of 30 ms (that is, if you specify a lower value, 30 ms will be used instead); the default is 70 ms.
The DTMF tones couldn't be sent because the track has been stopped, or is in a read-only or inactive state.
One or more of the characters in
tonesis not valid DTMF.
|WebRTC 1.0: Real-Time Communication Between Browsers (WebRTC 1.0)|
BCD tables only load in the browser