Published by michaeldzjap almost 2 years ago
The 2.0.0 version of waveplayer is basically a complete rewrite of the code base in TypeScript, including the public facing API. Hence, upgrading from 1.x to 2.x will not be a simple npm install waveplayer@latest
only. The most noticeable changes will be documented below, but details likely will be missing.
View
class.Playlist
class has been added in favour of the WavePlayer#createPlaylist
method in version 1.x.Lots of (small) changes to the API. Too many to name here really. To learn what has changed it is probably most useful to look at the documentation and the examples.
Published by michaeldzjap over 4 years ago
Update dependencies and fix security alerts.
Published by michaeldzjap over 4 years ago
Fresh build after updating dependencies.
Published by michaeldzjap over 5 years ago
Published by michaeldzjap about 6 years ago
Published by michaeldzjap about 6 years ago
loadAudio()
to load an audio file only, without loading and rendering the waveform view and loadWaveform()
to load and render the waveform view without loading the audio file. Use case could be where one would like to load multiple waveform views on a page, but defer loading of all audio (or vice versa).See the README for more details
Published by michaeldzjap over 6 years ago
load()
method now waits for the waveplayer:canplay
event to be fired before resolving.drawWave()
methodcurrentTime
to get the current playback time (in seconds) of the currently loaded / playing track and duration
to get the total duration (in seconds) of the currently loaded / playing track.useGradient
has been added to enable / disable drawing the waveform with a gradient (default is drawing with a gradient)load()
function now takes a second optional argument data
. This can be used to pass in the data needed to draw the waveform as opposed to load it via JSON (still default). The createPlaylist()
method now also accepts passing in an array of objects instead of an array of URL strings. Each object should contain an url
property pointing to the audio URL and a data
property pointing to an array or object containing the waveform data associated with the audio URL.Thanks to @thespice for suggesting the new features.
Published by michaeldzjap over 6 years ago
Published by michaeldzjap almost 7 years ago
Maintenance + small improvements.
Published by michaeldzjap almost 7 years ago
Bump version
Published by michaeldzjap almost 7 years ago
The source code has been optimised and rewritten according to ES6 standards. Some bugs with the playlist feature have been solved. Bundling is handled by rollup.js. The examples have been refactored as well.
Note: This release is not completely backwards compatible and will most likely break some code.
Published by michaeldzjap almost 7 years ago