tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RTCDTMFSender.txt (4382B)


      1 Coverage is based on the following editor draft:
      2 https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
      3 
      4 7.  insertDTMF
      5 
      6    [Trivial]
      7    - The tones parameter is treated as a series of characters.
      8 
      9    [RTCDTMFSender-insertDTMF]
     10    - The characters 0 through 9, A through D, #, and * generate the associated
     11      DTMF tones.
     12 
     13    [RTCDTMFSender-insertDTMF]
     14    - The characters a to d MUST be normalized to uppercase on entry and are equivalent
     15      to A to D.
     16 
     17    [RTCDTMFSender-insertDTMF]
     18    - As noted in [RTCWEB-AUDIO] Section 3, support for the characters 0 through 9,
     19      A through D, #, and * are required.
     20 
     21    [RTCDTMFSender-insertDTMF]
     22    - The character ',' MUST be supported, and indicates a delay of 2 seconds before
     23      processing the next character in the tones parameter.
     24 
     25    [RTCDTMFSender-insertDTMF]
     26    - All other characters (and only those other characters) MUST
     27      be considered unrecognized.
     28 
     29    [Trivial]
     30    - The duration parameter indicates the duration in ms to use for each character passed
     31      in the tones parameters.
     32 
     33    [RTCDTMFSender-ontonechange]
     34    - The duration cannot be more than 6000 ms or less than 40 ms.
     35 
     36    [RTCDTMFSender-ontonechange]
     37    - The default duration is 100 ms for each tone.
     38 
     39    [RTCDTMFSender-ontonechange]
     40    - The interToneGap parameter indicates the gap between tones in ms. The user agent
     41      clamps it to at least 30 ms. The default value is 70 ms.
     42 
     43    [Untestable]
     44    - The browser MAY increase the duration and interToneGap times to cause the times
     45      that DTMF start and stop to align with the boundaries of RTP packets but it MUST
     46      not increase either of them by more than the duration of a single RTP audio packet.
     47 
     48    [Trivial]
     49    When the insertDTMF() method is invoked, the user agent MUST run the following steps:
     50 
     51      [Trivial]
     52      1.  let sender be the RTCRtpSender used to send DTMF.
     53 
     54      [Trivial]
     55      2.  Let transceiver be the RTCRtpTransceiver object associated with sender.
     56 
     57      [RTCDTMFSender-insertDTMF]
     58      3.  If transceiver.stopped is true, throw an InvalidStateError.
     59 
     60      [RTCDTMFSender-insertDTMF]
     61      4.  If transceiver.currentDirection is recvonly or inactive, throw an
     62          InvalidStateError.
     63 
     64      [Trivial]
     65      5.  Let tones be the method's first argument.
     66 
     67      [RTCDTMFSender-insertDTMF]
     68      6.  If tones contains any unrecognized characters, throw an InvalidCharacterError.
     69 
     70      [RTCDTMFSender-insertDTMF]
     71      7.  Set the object's toneBuffer attribute to tones.
     72 
     73      [RTCDTMFSender-ontonechange]
     74      8.  If the value of the duration parameter is less than 40, set it to 40.
     75 
     76          [RTCDTMFSender-ontonechange-long]
     77          If, on the other hand, the value is greater than 6000, set it to 6000.
     78 
     79      [RTCDTMFSender-ontonechange]
     80      9.  If the value of the interToneGap parameter is less than 30, set it to 30.
     81 
     82      [RTCDTMFSender-ontonechange]
     83      10. If toneBuffer is an empty string, abort these steps.
     84 
     85      [RTCDTMFSender-ontonechange]
     86      11. If a Playout task is scheduled to be run; abort these steps;
     87 
     88          [RTCDTMFSender-ontonechange]
     89          otherwise queue a task that runs the following steps (Playout task):
     90 
     91          [RTCDTMFSender-ontonechange]
     92          1.  If transceiver.stopped is true, abort these steps.
     93 
     94          [RTCDTMFSender-ontonechange]
     95          2.  If transceiver.currentDirection is recvonly or inactive, abort these steps.
     96 
     97          [RTCDTMFSender-ontonechange]
     98          3.  If toneBuffer is an empty string, fire an event named tonechange with an
     99              empty string at the RTCDTMFSender object and abort these steps.
    100 
    101          [RTCDTMFSender-ontonechange]
    102          4.  Remove the first character from toneBuffer and let that character be tone.
    103 
    104          [Untestable]
    105          5.  Start playout of tone for duration ms on the associated RTP media stream,
    106              using the appropriate codec.
    107 
    108          [RTCDTMFSender-ontonechange]
    109          6.  Queue a task to be executed in duration + interToneGap ms from now that
    110              runs the steps labelled Playout task.
    111 
    112          [RTCDTMFSender-ontonechange]
    113          7.  Fire an event named tonechange with a string consisting of tone at the
    114              RTCDTMFSender object.
    115 
    116 Coverage Report
    117 
    118  Tested        31
    119  Not Tested     0
    120  Untestable     1
    121 
    122  Total         32