
So, PHP and JavaScript taking to each other… That’s where Ajax come to play, and that’s where I was stuck since months.Ījax is kind of complex: JavaScript communicating to PHP via XML or other format)… But what I discovered thanks to an OpenClassrooms tutorial that jQuery handle AJAX pretty well. And peaks file need to be reed from JavaScript, but as the uploads folder is not always at the same time across WordPress websites, JavaScript need to call these files from PHP. But peaks have to been creating server side by PHP. It needed a bit of planning: so waveform decoding has to been done from front-end by wavesurfer-wp. WavePlayer plugin author made this feature for his wavesurfer-js music oriented WordPress integration so I know it was possible: he even kindly told me the basic concept.įew days ago… I get enough of this stagnation for my plugin, and decided to try as hard as it would require to implement this feature. That is way too much to be usable in production.īut it was too complicated for me. Without it, decoding peaks for 50 minutes audio can take 30 seconds if the audio has not been pre-loaded by the browser. I wanted this feature for WaveSurfer-WP since a long time. It is a process that is used by professional audio software, and also by wavesurfer-js, the script that powered by my WaveSurfer-WP WordPress audio player plugin.
Wavesurfer exportimage full#
No need to analyze and decode the full audio then, the peaks are not calculated but only read from small text files.

To speed up to rendering, instead of leaving scripts to the analysis, peaks file can be created, and waveform are rendered from these values.

3.2 Timeline Plugin Basic Customizationĭisplaying a waveform from an audio file is a process that can take a bit of time.
