For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface 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

interface RTCDTMFSender {
    canInsertDTMF: boolean;
    ontonechange:
        | ((this: RTCDTMFSender, ev: RTCDTMFToneChangeEvent) => any)
        | null;
    toneBuffer: string;
    addEventListener<K extends "tonechange">(
        type: K,
        listener: (this: RTCDTMFSender, ev: RTCDTMFSenderEventMap[K]) => any,
        options?: boolean | AddEventListenerOptions,
    ): void;
    addEventListener(
        type: string,
        listener: EventListenerOrEventListenerObject,
        options?: boolean | AddEventListenerOptions,
    ): void;
    dispatchEvent(event: Event): boolean;
    insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
    removeEventListener<K extends "tonechange">(
        type: K,
        listener: (this: RTCDTMFSender, ev: RTCDTMFSenderEventMap[K]) => any,
        options?: boolean | EventListenerOptions,
    ): void;
    removeEventListener(
        type: string,
        listener: EventListenerOrEventListenerObject,
        options?: boolean | EventListenerOptions,
    ): void;
}

Hierarchy

  • EventTarget
    • RTCDTMFSender
Index
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.

MDN Reference

ontonechange: ((this: RTCDTMFSender, ev: RTCDTMFToneChangeEvent) => any) | null
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().

MDN Reference

  • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

    MDN Reference

    Type Parameters

    • K extends "tonechange"

    Parameters

    Returns void

  • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

    MDN Reference

    Parameters

    Returns void

  • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

    MDN Reference

    Parameters

    • event: Event

    Returns boolean

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

    MDN Reference

    Parameters

    • tones: string
    • Optionalduration: number
    • OptionalinterToneGap: number

    Returns void

  • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

    MDN Reference

    Type Parameters

    • K extends "tonechange"

    Parameters

    Returns void

  • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

    MDN Reference

    Parameters

    Returns void

Was this helpful?