-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear minimap when new audio is loaded #617
Comments
It's a bug in the minimap plugin. It should listen to wavesurfer's |
It listens but it has no destroy function. I added one, and it still didn't work. It seems the correct way to load a new waveform is to call destroy(), reinitialise and then load. Everything else in wavesurfer works just fine if you just call load() again, maybe with some clearing of regions etc. |
It has a destroy function. It's inherited from the
Yes, there seems to be some bug. |
Okay, that's odd, because it works after I inserted the destroy function. |
Can we close this, @katspaugh and @Lingomat? |
@chrisparton1991 unless I've missed something, the minimap hasn't been touched since the time this was filed. |
I saw the last comment by @Lingomat and thought it might have fixed the issue. Just wanted to check if it was still needed as it's been sitting still for a while. I can take a look at this some time soon if it's still an issue. |
It was probably something else I did related to lifecycle. Not an active issue for me anyway. |
I'm not sure if this is directly related to the initial issue described, but I am having an issue with loading a new waveform. I have a clipping option, which trims out unwanted areas of audio. I reload the wavesurfer with a new audio file and clear any defined regions:
The new waveform loads and works fine for zooming and playback. However, when I attempt to draw a new region, it creates two regions. I'm assuming this is because there are two instances of the waveform container on top of each other. So, I went another route to actually destroy the waveform and reinitialize it with the new audio file.
This generates the new clipped waveform, but playback and zooming returns errors. I logged out the wavesurfer object after it is reinitialized and it is defined with the new audio file (test-cut2.mp3) as its currentSrc. Am I just missing a step? Any help is greatly appreciated! |
@tanky-shang I'll have a look at the minimap being refreshed when new audio is loaded. For now you can do something like this in jquery, before calling
|
Will be fixed when #1203 is merged and released. |
I have a player that loads files when you click on them. The new waveform is loaded and new audio plays, but the minimap from the previous one stays and the new minimap is drawn on top of it. If you select another file, then you have three minimaps on top of eachother, and they don't clear until you refresh the page.
How do I make the minimap go away when a new file is loaded?
The text was updated successfully, but these errors were encountered: