A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFSender/canInsertDTMF below:

RTCDTMFSender: canInsertDTMF property - Web APIs

RTCDTMFSender: canInsertDTMF property

Baseline 2024

Newly available

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.

Value

A boolean value which is true if the RTCDTMFSender is capable of sending DTMF tones, or false if it is not.

Examples Using canInsertDTMF to check DTMF support

This example shows how to use the canInsertDTMF property to check DTMF support in a WebRTC connection and then send tones if supported.

The code first checks if the canInsertDTMF property is defined, and if so, uses it to check whether inserting DTMF tones is supported. If the feature is supported, RTCDTMFSender.insertDTMF() is called to insert a tone.

if (sender.dtmf.canInsertDTMF) {
  const duration = 500;
  sender.dtmf.insertDTMF("1234", duration);
} else {
  console.log("DTMF function not available");
}
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3