The new version features dependency injection and a dynamic plugin API. This became necessary to fully support module bundlers like webpack or browserify. (Before version 2 wavesurfer relied on a global library object)
Apart from this architectural change there have been a number of smaller changes and refactors:
The version is stable and functional. Due to the nature of the refactor (an integrated plugin system for adding, initialising and destroying of plugin instances) all plugins are somehow affected. Some plugins are still buggy when used with the dynamic plugin API.
Conventional use cases (i.e. cases where you just want to create an instance with some plugins – no dynamic adding or removing – should work just fine) (Below in the plugin API examples, this means 1. should already work, 2. and 3. don't yet always work in all situations and for all plugins)
See the beta versions available by running
npm view wavesurfer.js versions | grep 2.0.0 in your console.
Then install the version you want with
npm install [email protected]
npm install and then
npm start – The library directory is exposed under http://localhost:8080
Generate the documention by running
npm run doc (see below) – Tests can be run by calling
npm run test
There are still lots of things which need doing. We are thankful for any help we can get. Please see right at the bottom of this page how you can help.