wavesurfer.js icon indicating copy to clipboard operation
wavesurfer.js copied to clipboard

When using Regions: when event "region-out" is triggered, and I move the player to the next region, events "region-in" and "region-out" alternatingly keep triggering

Open pmcp opened this issue 10 months ago • 1 comments

I'm trying to create a setup where only regions are played. After one region is played, wavesurfer jumps to the next region.

Bug description

When using Regions: when event "region-out" is triggered, and I move the player to the next region, events "region-in" and "region-out" alternatingly keep triggering

Environment

  • Browser: Firefox
  • Macos

Minimal code snippet

https://codepen.io/pmcp/pen/eYojavM

Expected result

I expect the the player to start playing the next region when it exists the previous one.

Obtained result

It keeps firing "region-out", which creates an infinite loop

pmcp avatar Apr 15 '24 13:04 pmcp