-
Is there a way to display the waveform without decoding / loading data? I am providing the peaks array like this:
and would like to display it while the waveform is being loaded, is this possible? I saw this: #3875 was wondering if i could load a dummy file for example then reload a real file afterwards just to trick the surfer... or open to other suggestions |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To do this you need to call wavesurfer.load(audioUrl, peaksData.peaks, peaksData.duration) If duration isn't passed, it will still load the audio into an |
Beta Was this translation helpful? Give feedback.
-
Thanks that worked like a charm! 🙏 |
Beta Was this translation helpful? Give feedback.
To do this you need to call
load
with 3 parameters:If duration isn't passed, it will still load the audio into an
<audio>
element (but not fetch it with Ajax). The audio URL can be an empty string, but then make sure to pass a duration. You can later call load again with the actual audio URL.