Performance: GET request for AJAX peaks loading instead of Post.Performance: GET request peaks loading instead of PHP.Security: Peaks can now be written only by Admins.Peak creation from ‘edit-posts’ capability (better for multi-author website).Interactive Markers System, for quick jump buttons and interactive transcripts (see options panel).New marker format: hh:mm:ss.ms (minimum field is ss).Performance optimization with better peaks loading logic.Marker button data end insertion bug fix.Continuous shortcode attribute for playlist support for the premium add-on.Number of secondary time labels (Time labels between primary labels). Usually it is equal to the duration in minutes. Number of intervals that records consists of. The color of the non-modulo-ten time labels The color of the non-modulo-ten notch lines The height (in percent) of the minor notch lines in the timeline. Then you can add attributes to specify your timeline display. You can put timeline="true" as shortcode attribute to display a timeline below the waveform. Integration of the wavesurfer-js timeline plugin into WaveSurfer-WP-Premium. Here is the marker demo, with its edit button on the editor.
See the full article about this feature here. This allows you to create quick jump buttons and interactive transcripts. I advice you to use PHP 7 and HTTP2 for best performance. Here is a demo of cache feature offer by this add-on: Add-On Inactive Add-On Active Features Peaks Filesĭraw peaks from cache files instead of having to wait for the audio file be downloaded. This add-on could have other extras features for WaveSurfer-WP in the future, but this is another story.
Contributions of other users on the free version (themes, code, translation) are still possible.The free plugin act like a working demo version.Rather than having a premium version of the plugin, I decided to pack this as an add-on. I thought it was a good idea to propose this ass a paid feature, in order to helps me maintaining the free version, which only gets me two donations (despite the fact it is used on more than 200 websites). It took shapes, little by little… and ultimately, with a lot of trials and errors… I succeed to create this cache feature!
That was only the beginning of the journey cause a lot of others things have to been handle: WordPress Ajax (which requires particular setup – and which is kind of convenient actually), WordPress variable (uploads path), finding a way to generate unique ID for each peaks files, find how to retrieve peak values, find a way to communicate these data, handling failure, process sanitization… Action 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. 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.