katspaugh / wavesurfer.js

Audio waveform player
https://wavesurfer.xyz
BSD 3-Clause "New" or "Revised" License
8.75k stars 1.62k forks source link

Is there a region loop repeat event? #2573

Closed swampthang closed 2 years ago

swampthang commented 2 years ago

Using version 6.2.0 for wavesurfer and regions plugin from cloudflare.com Mac OS BigSur

This is the codepen where I'm building and testing a musician's practice app allowing the user to click a measure and then shift-click another measure to select a group of measures to repeat.

I need to be able to know when the loop jumps back to the beginning. I don't see anything like wavesurfer.on('region-loop')

I see these but it doesn't seem like any of them are triggered on repeat:

region-created region-updated region-update-end region-removed region-play region-in region-out region-mouseenter region-mouseleave region-click region-dblclick

swampthang commented 2 years ago

Ahhhh, I see that region-in fires on repeat. Awesome!