zhw2590582 / WFPlayer

:ocean: WFPlayer.js is an audio waveform generator
https://wfplayer.js.org
MIT License
262 stars 32 forks source link

adding grab_start and grab_end events #51

Closed VeloeEvall closed 7 months ago

VeloeEvall commented 7 months ago

Hi. I'd love to have grabbing_start and grabbing_end events added to pause my audio during the time i'm holding mouse, because now when i stop moving mouse it plays my audio. I'm not using html tag, I've created audio in js code.

zhw2590582 commented 7 months ago

you can do this

wf.on('mousedown', () => {
// grabbing_start 
});

wf.on('mousemove', () => {
// grabbing
});

wf.on('mouseup', () => {
// grabbing_end 
});
VeloeEvall commented 7 months ago

Ah yeah, sorry I didn't see that. Thanks a lot!