Re: DTMF v4

On 12/14/2012 03:25 PM, Pastro, Rodrigo wrote:
> Hi Harald,
>
> I have a few questions regarding the proposed DTMF API. Some of these issues may have already been discussed in the meetings, so I apologize if I'm asking repeated questions.
>
> - How does the application know if the call to insertDTMF was accepted? Shouldn't this function return a boolean (or possibly have success/error callbacks)? I understand that the application should first check if canInsertDTMF returns true, but does that really guarantee that insertDTMF will be accepted?
I'd claim that it shoud throw an error (state error, argument error). 
that should also happen if you ask it to send the tone string 
"ohmygoditsnothexadecimal".
>
> - What happens if insertDTMF is called on a disabled (e.g. muted) MediaStreamTrack? Is the request rejected or are the digits buffered to be processed when the MediaStreamTrack is enabled again?
What do you think should happen?
I think a muted mediastreamtrack is silent, so it doesn't send anything 
at all. But that's just because it seems consistent with media input.
>
> - What happens if the MediaStreamTrack is disabled (e.g. muted) while the DTMF digits are being sent? Is the toneBuffer emptied? Is there a "tonechange" event?
What do you think should happen?
I think the tones should just play into the dead channel - 
"ontonechange" is called as usual, but sound doesn't make it out. That's 
consistent with "this is a media input, and the track's muted" - audio 
isn't bunched up for playing out after a mute/unmute either.
>
> - According to the current spec, if insertDTMF is called on the same object while an existing task for this object to generate DTMF is still running, the previous task is canceled. Is there a "tonechange" event indicating that the previous sequence has been canceled? The same question also applies to the case insertDTMF is called with an empty string to cancel the tones being sent.
Text change. See if you like the new one.
>
> - Is there a way to get the associated PeerConnection instance for a given RTCDTMFSender object?
No. It seems simpler for JS to keep track of this for itself.
>
> - What happens if the application attempts to use an RTCDTMFSender which is associated with a closed PeerConnection or an ended MediaStreamTrack? Is there an exception?
I think that's a state error.
>
> - I'm assuming the application can check the state of the RTCDTMFSender via the associated MediaStreamTrack's readyState attribute and onended event handler. Is that a valid assumption?
I don't think the RTCDTMFSender has state, apart from its playout 
buffer. If you want to know the state of the PC and the track, you 
should look at the PC and the track.

>
>
> Thanks for your support.
>
> -- Rodrigo
>
>
> -----Original Message-----
> From: Harald Alvestrand [mailto:harald@alvestrand.no]
> Sent: Friday, December 14, 2012 5:40 AM
> To: public-webrtc@w3.org
> Subject: DTMF v4
>
> Appropriate changes from on-call discussion and subsequent email
> exchanges have been applied.
> I think there's now consensus to take this to the editors.
>
>               Harald
>

Received on Monday, 17 December 2012 12:29:29 UTC