W3C home > Mailing lists > Public > public-webrtc@w3.org > December 2012

Re: DTMF v4

From: Martin Thomson <martin.thomson@gmail.com>
Date: Mon, 17 Dec 2012 08:31:54 -0800
Message-ID: <CABkgnnX1cXKEGFnAtoD8kshgvdu3L7D5vSDohUUGp2hz3QOMCw@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>
Cc: "Pastro, Rodrigo" <rodrigo.pastro@siemens-enterprise.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 17 December 2012 04:28, Harald Alvestrand <harald@alvestrand.no> wrote:
>> 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.

I have a different view on this.  If there is a sequence playing out,
the task should not be cancelled, the pending tones should be replaced
with the new tone string.  Since we can't "recall" a tone, this allows
the tone duration and spacing to be respected.  It also enables code

    sender.ontonechange = function(e) {
        var next = tones.shift();
        e.target.insertDTMF(next.tone, next.duration);

Without proper spacing, the tones would all run into each other, as
fast as the event loop can spit them out.

But that assumes that we fire the empty string tonechange event when
an empty string is provided.  That is what the pseudocode says, but I
can imagine some zealous programmer deciding to prevent this.
Received on Monday, 17 December 2012 16:32:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:32 UTC