Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 489 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 489 Bytes

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.