var foo = new Waveformer()
foo.init({
waveformer: [ /* array of floats */ ],
height: 200,
width: 800,
reflection: 0.3,
waveWidth: 2,
gutterWidth: 1,
container: document.body,
trackLength: 420
})
options are:
waveform
array of floatsheight
waveform height in pixelswidth
waveform width in pixelsreflection
0-50% where 0.34 = 34%waveWidth
wave width in pixelsgutterWidth
pixels between wavescontainer
dom node where waveform will be appendedtrackLength
track length in seconds
waveformer has initialized
when track is paused
when track is played
when track finishes playing
on mouse hover
on mouse click
when user skips to a new time
play track
pause track
skip to any point
###update updates are instantly applied and rendered
options.gutterWidth
options.waveWidth
options.width
options.height
options.reflection
###colors colors are instantly applied and rendered
set color
set gradient
MIT