VoiceLive.js
Voice Live function library with Howler.js.
Installation
In a browser:
Using npm:
$ npm i -S howler
$ npm i -S voiceLive
Examples
var datas =id: 4src: 'xxxxx'time: 16currentTime: 0id: 4src: 'xxxxx'time: 25currentTime: 0;var vl =datas: thisdatas{ // for live process, and like a timerprogress = progress * 100 // for to 100if progress > 99progress = 10000textMath + 's';textprogress + '%'}events: // events for current voice{console;}{console;}{console;}{console;}{console;}{this; // for auto play next itemconsole;};
Methods
-
vl.play(id)
-
vl.pause(id)
-
vl.stop(id)
-
vl.seek(id, time)
-
vl.playNext()
-
vl.playPre()
-
vl.addVoice(data)
-
vl.destory([id][,fn])
-
vl.replaceVoice(id, src)