RE: Issue 178: Some DTMF Questions

My take on Shijun's questions below: 

1. Before sendObject.send() is called, DTMF is not configured yet (e.g. no Payload Type, supported events, etc.).  So sender.insertDTMF() can't actually send tones.  Rather than queuing the tones and waiting until sendObject.send() is called to send them, an exception seems preferrable. 

2. Construction of an RTCRtpSender object requires an audioTrack, regardless of whether the developer is only intending only to send DTMF or to interleave DTMF and audio packets. In the latter case, I'd assume that the sender stops encoding audioTrack when DTMF tones are being sent. 
________________________________________
From: Bernard Aboba [Bernard.Aboba@microsoft.com]
Sent: Monday, February 09, 2015 2:34 PM
To: public-ortc@w3.org
Subject: Issue 178: Some DTMF Questions

>From Shijun Sun:

1. What happens if a DTMFSender object sender is constructed from an RTCRtpSender object sendObject and methods such as insertDTMF() are called, but sendObject.send() was not previously called to set up the DTMF codec?
var sendObject = new RTCRtpSender(audioTrack, dtlsTransport);
var sender = new RTCDtmfSender(sendObject);
if (sender.canInsertDTMF) {
var duration = 500;
sender.insertDTMF("1234", duration);
} else
log("DTMF function not available");

In the above example (assuming the DTMF function is available) does sender.insertDTMF() throw an InvalidState exception?

2. In the single sender example above, what happens to the audioTrack when DTMF is being sent? Presumably the audioTrack is not encoded, correct? Then once the DTMF tones are played out, audioTrack is encoded and sent over the wire within RTP packets again?

Received on Monday, 9 February 2015 22:51:46 UTC