waveform-playlist
waveform-playlist copied to clipboard
Feature Idea: playlist.destroy()
Sometimes if you're dealing with multiple waveform-playlist
instances, it would be nice to be able to destroy one. This is sort of possible right now, however if the playlist is currently loading a track, it will continue to execute that logic (and any event handlers associated with loading that the user has set up), regardless if you've cleared or deleted the instance.
Ideally, the loading promises would be cancellable, and when you call playlist.destroy()
it cleans everything up, the audioContext, the DOM elements, and also would cancel any pending promises!
I'll think through this one a bit more, but just dropping this issue in case there could be a nice discussion.