Replies: 1 comment 3 replies
-
Make sure WaveSurfer.create is only run once. You might have more luck with the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, Dear Community and Author!
I really need help ASAP.
Wavesurfer is one of the best libraries, but I've encountered an issue and don't know how to fix it.
I have a shared player in my app. This player is used in many places to sync track playback progress.
My current code:
However, when, for example, track A is playing, and I open the page for track B, my wavesurfer gets rerendered, and track A stops playing because wavesurfer updates the
media
and replace track (mini-player moved to start position). I've tried to set themedia
only when the current track page starts playing using this code:But it doesn't take any effect. The waveform just doesn't play. If I set
wavesurfer.setMediaElement(player.getElement())
, it just hangs and starts consuming a lot of memory.How can I make it so that the waveform is displayed, but the media element is not changed until I press play on the current track?
Beta Was this translation helpful? Give feedback.
All reactions