ACTION-17: Draft an API proposal for a DTMF track inside a MediaStream.
Draft an API proposal for a DTMF track inside a MediaStream.
- State:
- closed
- Person:
- Cullen Jennings
- Due on:
- November 16, 2011
- Created on:
- November 9, 2011
- Related emails:
- Re: Housekeeping: Open actions in the WG tracker (from juberti@google.com on 2011-12-15)
- Re: Housekeeping: Open actions in the WG tracker (from mmanig@gmail.com on 2011-12-09)
- Re: Housekeeping: Open actions in the WG tracker (from juberti@google.com on 2011-12-09)
- Re: Housekeeping: Open actions in the WG tracker (from stefan.lk.hakansson@ericsson.com on 2011-12-09)
- Housekeeping: Open actions in the WG tracker (from harald@alvestrand.no on 2011-12-09)
Related notes:
Proposal by Justin to the list seems appropriate.
Done.
said proposal:
We add support for DTMF by adding a single "insertDTMF" method to audio MediaStreamTracks. DTMF can be inserted either in outbound (sendonly) tracks, where it causes RFC 4733 DTMF to be generated (using the same SSRC and clock as the audio it interrupts), or in inbound (recvonly) tracks, where it causes the specified tones to be played out if the track is connected to an appropriate sink, e.g. an <audio/> tag.
The "canInsertDTMF" property also exists to allow applications to determine if a given track supports DTMF. All inbound tracks support DTMF, as do outbound tracks attached to a PeerConnection that has negotiated support for the "audio/telephone-event" media type.
DTMF API
class AudioMediaStreamTrack : MediaStreamTrack {
readonly attribute boolean canInsertDTMF;
void insertDTMF(in DOMString tones, optional long duration)
}
Specifics
|tones| consists of 0-9, '#', '*', A-D, and ','
if unspecified, |duration| is 100 ms
inter-digit pause is 50 ms
',' adds an additional 50 ms pause
Display change log.