dictaphone-js
Voice recording library based only on WEB Audio API interface. This library allows you to make a voice recording, play, pause and rewind record. The library is fully modular. This means you can use require or import to get it.
Demo and Example
<!-- HTML --> Record Stop Play/Pause Rewind Fastforward Save 0:00 / 0:00
// --- JS CODE --- const Dictaphone = ; const player = document rec = document stop = document pp = document rew = document ff = document; // Create instance const dictaphone = player; rec; stop; pp; rew; ff;
Instalation and Usage
The easiest way to use Dictaphone-js is to install it from NPM and include it in your own js build process (using Webpack, etc).
npm install dictaphone-js --save
At this point you can import dictaphone-js in your application as follows:
;// ORconst Dictaphone = ;
API methods
startRecording()
stopRecording()
play()
pause()
togglePlayback()
rewind(time)
time | Number (sec) - required
rewindToBegin()
rewindToEnd()
Events
You can add an event listener that fires when the some event happens.
...dictaphone;
Dictaphone-js provides next events:
- 'play',
- 'pause',
- 'startRecording',
- 'stopRecording',
- 'progress',
- 'pause',
- 'rewind',
- 'error'
License
Popcorn.js is made available under the MIT License.