Proposal for removing createDTMFSender and canInsertDTMF

At TPAC 2014, we realized that now that we have RtpSender, we don't need a
DTMFSender to be tied to a track.  We can tie it to an RtpSender instead,
and that would clean things up a fair bit.

Based on that, I propose we:

1. Remove RTCPeerConnection.createDTMFSender
2. Add RTCRtpSender.dtmf, of type "RTCDTMFSender?".
3. Remove RTCDTMFSender.canInsertDTMF and RTCDTMFSender.track.

The rule is: If RtpSender.dtmf is non-null, you can send DTMF.  Here is an
example:

var pc = ...;
var track = ...;
var rtpSender = pc.addTrack(track);
if (rtpSender.dtmf) {
  rtpSender.dtmf.insertDTMF(...);
}

And here is the WebIDL:

 interface RTCDTMFSender {
    void insertDTMF(DOMString tones,
                    optional long duration = 100,
                    optional long interToneGap = 70);
                attribute EventHandler ontonechange;
    readonly    attribute DOMString    toneBuffer;
    readonly    attribute long         duration;
    readonly    attribute long         interToneGap;
};

partial interface RtpSender {
    readonly attribute RTCDTMFSender? dtmf;
}

Received on Monday, 3 November 2014 21:44:30 UTC