Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
/ dtmf Public archive

A phone keypad audio player for the web

License

Notifications You must be signed in to change notification settings

kimmelsg/dtmf

Repository files navigation

dtmf Build Status codecov

Dual Tone - Multi Frequency player using Web Audio API

Try the Demo

Install

$ npm install @kimmel/dtmf

Usage

import DTMF from '@kimmel/dtmf';

let player = new DTMF();
player.play(1);
player.play(8);
player.play(0);
player.play(0);
//=> plays DTMF sound for each key

API

DTMF(audioContext: AudioContext)

play(key: DialpadKey)

Type: DialpadKey, String | Number

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #, A, B, C, D

License

MIT © Ryan Castner