play-dtmf

A simple library to play DTMF tones using Web Audio API

Usage no npm install needed!

<script type="module">
  import playDtmf from 'https://cdn.skypack.dev/play-dtmf';
</script>

README

play-dtmf

This is a simple library that allows playing DTMF tones using Web Audio API. It should work in any browser supporting Web Audio API.

Usage

import {DtmfPlayer} from 'play-dtmf';
let dtmfPlayer = new DtmfPlayer();
dtmfPlayer.play('1');
setTimeout(() => {
  dtmfPlayer.stop();
  dtmfPlayer.close();
});

TODO list

  • Improve tests.
  • Add documentation.