这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

RTCDTMFToneChangeEvent() 构造函数创建新 RTCDTMFToneChangeEvent .

句法

 var event = new RTCDTMFToneChangeEvent(type, options);
					

参数

type
DOMString containing the name of the event. This is always "tonechange" .
选项
A dictionary of type RTCDTMFToneChangeEventInit , which may contain one or more of the following fields:
tone
A DOMString containing a single DTMF tone character which has just begun to play, or an empty string ( "" ) to indicate that the previous tone has stopped playing. See Tone characters for details on what characters are permitted.

返回值

A newly-created RTCDTMFToneChangeEvent , configured as specified in the provided options.

Tone characters

The digits 0-9

These characters represent the digit keys on a telephone keypad.

The letters A-D
These characters represent the "A" through "D" keys which are part of the DTMF standard but not included on most telephones. These are not interpreted as digits. Lower-case "a"-"d" automatically gets converted to upper-case.
The pound/hash sign ("#") and the asterisk ("*")

These correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad.

The comma (",")

This character instructs the dialing process to pause for two seconds before sending the next character in the buffer.

All other characters are unrecognized and will cause insertDTMF() to throw an InvalidCharacterError 异常。

规范

规范 状态 注释
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCDTMFToneChangeEvent()' in that specification.
候选推荐 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
RTCDTMFToneChangeEvent() 构造函数 Chrome 27 Edge ≤18 Firefox 52 IE No Opera Yes Safari ? WebView Android 4.4 Chrome Android 27 Firefox Android 52 Opera Android Yes Safari iOS ? Samsung Internet Android 1.5

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

另请参阅

元数据

  • 最后修改: