After adding peaks to the load parameters, events stop firing
See original GitHub issueIf I just use the wavesurfer.load(url) method, the file is loaded and the events fire without any problems, for example “ready”:
wavessurfer.on('ready', function() {
wavessurfer.play();
});
If I add peeks as parameters, an image of loaded peeks appears, but not one event is fired anymore:
var peeks = [0.0022365502,0.27022097,0.018188005,-0.289925, ...more values... 0.16755348];
wavesurfer.load(url, peeks);
I am using the latest version of wavessurfer.js: unpkg.com/wavesurfer.js@6.3.0/dist/wavesurfer.js
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
'ready' event only fires when using load() without the peaks ...
Hello,. When using load() without the peak parameter, the READY event is fired as expected. ... However, when loading in peaks from an...
Read more >Event listener firing too early when parameters are passed
The cancel function requires two parameters which it uses to determine which list of entities to build. The problem lies in the parameters....
Read more >HPLC troubleshooting guide - CCC
This variability should not be detrimental to your method, since the retention times of all peaks change proportionally to each other and resolution...
Read more >Welcome to Bull's Guide - GitHub Pages
When a job stalls, depending on the job settings the job can be retried by another idle worker or it can just move...
Read more >SoundManager 2: Javascript Sound for the Web - Futures and Options
When served over HTTP, internet URLs may be loaded but not local filesystem ... In the event SMSound.onload() fires and the loaded property...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem here. If there is a file URL and peaks data - “ready” event is not fired with “WebAudio” backend (“waveform-ready” if not fired as well). Version 6.3.0. As a temporary workaround I am calling .play() right after the .load() call, catch “ready” event (that is getting fired then) and immediately call .pause() inside my “ready” hook. Then “ready” event is generated properly and I can add regions to my waveform.
this workaround solves the problem for me. thank you! in my case, i am not supplying the duration of the audio clip when loading (since the audiowaveform json output doesn’t carry this information).