play-dtmf
v3.0.2
Published
A simple library to play DTMF tones using Web Audio API
Downloads
4,973
Readme
play-dtmf
This is a simple library that allows playing DTMF and ringing tones using Web Audio API. It should work in any browser supporting Web Audio API.
Usage
import {PhoneTonePlayer} from 'play-dtmf';
const audioContext = new AudioContext();
const phoneTonePlayer = new PhoneTonePlayer(audioContext);
const tone = phoneTonePlayer.playDtmf('1');
tone.stop(1000)
TODO list
- Improve tests.
- Improve documentation.