Replies: 1 comment
-
I’d recommend upgrading to v7 and loading peaks like this: https://wavesurfer.xyz/examples/?28c9974160c53983e6d6d5286e0f0558 |
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
-
If I load a waveform from a file using:
wavesurfer.loadBlob(blob);
Then I can get the cursor position by doing:
wavesurfer.getCurrentTime();
But, if I instead load an array of peaks like this:
wavesurfer.backend.setPeaks(ArrayOfPeaks,Duration);
When I do wavesurfer.getCurrentTime(); I always get 0. I have also tried doing wavesurfer.backend.getCurrentTime(); but it is also 0 always. wavesurfer.getDuration(); seems to work fine. Also, the progress color shows up correctly when I click on the waveform, and the cursor shows up in the location I clicked. But, getCurrentTime() just always gives 0.
If anyone has any ideas, I'd appreciate it
Beta Was this translation helpful? Give feedback.
All reactions