or create your own below
This kicks everything off, and needs to be called pretty much immediately. Never pass true to this function.
When a number is passed, it'll try to play the song based on position in the playlist. If nothing's passed, it resumes playing.
Pauses. This is triggered when the volume is set to 0.
Mixing things up. This toggles play and pause, for a certain button that shouldn't be enabled.
Plays the next song. I should probably make a prev() too.
Get or set the volume; Accepts a value between 0 and 1
Get or set the color of a specific element. There are currently only 3 elements: "main", "wave", and "progress".
- main is the background color for the playlist
- wave is the background color of the waveform/frequency bar thing
- progress is the color of the progress bar overlay
setColor accepts any css-valid color value.
You can also set the color by passing an object with the above keys paired with a color string eg. {main:'#eee',wave:'#444',progress:'#aaa'}
If you reallly feel like breaking away from the a e s t h e t i c you can pass true to this.