RTCDTMFSender

The RTCDTMFSender interface provides a mechanism for transmitting DTMF codes on a WebRTC RTCPeerConnection. You gain access to the connection's RTCDTMFSender through the RTCRtpSender.dtmf property on the audio track you wish to send DTMF with.

MDN Reference

Properties

Link copied to clipboard
external val canInsertDTMF: Boolean

The canInsertDTMF read-only property of the RTCDTMFSender interface returns a boolean value which indicates whether the RTCDTMFSender is capable of sending DTMF tones over the RTCPeerConnection.

Link copied to clipboard
external val toneBuffer: String

The RTCDTMFSender interface's toneBuffer property returns a string containing a list of the DTMF tones currently queued for sending to the remote peer over the RTCPeerConnection. To place tones into the buffer, call insertDTMF().

Functions

Link copied to clipboard
open external fun dispatchEvent(event: Event): Boolean
Link copied to clipboard
external fun insertDTMF(tones: String, duration: Int = definedExternally, interToneGap: Int = definedExternally)

The insertDTMF() method of the RTCDTMFSender interface sends DTMF tones to the remote peer over the RTCPeerConnection.

Link copied to clipboard
external fun <T : Event> when(type: EventType<T>, options: ObservableEventListenerOptions?): Observable<T>