W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2017

[webrtc-pc] Section 11.7: DTMF Examples

From: Bernard Aboba via GitHub <sysbot+gh@w3.org>
Date: Mon, 05 Jun 2017 20:07:43 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-233695453-1496693258-sysbot+gh@w3.org>
aboba has just created a new issue for https://github.com/w3c/webrtc-pc:

== Section 11.7: DTMF Examples ==
Looking at Section 11.7 there are a number of problems with the DTMF examples:

1. Example 17: 

The example does not append to the toneBuffer. 

2. Example 18 should be: 

if (sender.dtmf) {
  var duration = 500; 
  sender.dtmf.ontonechange = function (e) {
      if (!e.tone)
          return;
      // light up the key when playout starts
      lightKey(e.tone);
      // turn off the light after tone duration
      setTimeout(lightKey, duration, "");
  };
  sender.dtmf.insertDTMF(sender.dtmf.toneBuffer + "1234", duration);
} else
    log("DTMF function not available");

3. Example 19 should be: 

if (sender.dtmf) {
  sender.dtmf.ontonechange = function (e) {
      if (e.tone == "1")
          sender.dtmf.insertDTMF(sender.dtmf.toneBuffer + "2", 2000);
  };
  sender.dtmf.insertDTMF("1", 1000);
} else
    log("DTMF function not available");

4. Example 20: 

sender.dtmf.insertDTMF(sender.toneBuffer + "456");

Should be: sender.dtmf.insertDTMF(sender.dtmf.toneBuffer + "456");

sender.dtmf.insertDTMF(sender.toneBuffer + "789");

Should be: sender.dtmf.insertDTMF(sender.dtmf.toneBuffer + "789");

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1336 using your GitHub account
Received on Monday, 5 June 2017 20:07:49 UTC

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