Adding region fails if wavesurfer is loading #4201
Unanswered
Schwankenson
asked this question in
Q&A
Replies: 1 comment
-
|
That's the expected behavior. You should only add regions on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
I use wavesurfer as audio editor, where I often use loadBlob while the regions should stay active. Under some circumstances of asynchronous things, the addRegion is called when another event called the loadBlob function, and wavesurfer is still loading. In this case, the
virtualAppendfunction of region Plugin does not add the region.The isVisible check is
falsebecause wavesurfer is in loading mode andthis.wavesurfer.getDuration()returns 0;Solution is easy and clean
We can just add call to renderIfVisible on wavesurfer ready event:
Beta Was this translation helpful? Give feedback.
All reactions