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

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

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

另请参阅

元数据

  • 最后修改:
  1. WebRTC API
  2. RTCDTMFToneChangeEvent
  3. 构造函数
    1. RTCDTMFToneChangeEvent()
  4. 特性
    1. tone
  5. 继承:
    1. 事件
  6. Related pages for WebRTC
    1. MediaDevices.getUserMedia()
    2. Navigator.mediaDevices
    3. RTCCertificate
    4. RTCDTMFSender
    5. RTCDataChannel
    6. RTCDataChannelEvent
    7. RTCDtlsTransport
    8. RTCErrorEvent
    9. RTCIceCandidate
    10. RTCIceTransport
    11. RTCPeerConnection
    12. RTCPeerConnectionIceErrorEvent
    13. RTCPeerConnectionIceEvent
    14. RTCRtpReceiver
    15. RTCRtpSender
    16. RTCRtpTransceiver
    17. RTCSctpTransport
    18. RTCSessionDescription
    19. RTCStatsEvent
    20. RTCStatsReport
    21. RTCTrackEvent

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1