Skip to content

Releases: michaeldzjap/waveplayer

Version 2.0.0 of waveplayer

05 Jan 17:37
Compare
Choose a tag to compare

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.

Added

  • Strategies are a more flexible way instructing waveplayer how to resolve the amplitude data associated with an audio file. Currently 3 strategy types are available: data, JSON and Web Audio. The first two expect the amplitude data to be supplied in some form, whereas the Web Audio strategy may be used to compute the amplitude data at runtime. Although convenient it also has its drawbacks (see the README for more info).
  • It is possible to only use the view part of waveplayer now via the View class.
  • You can supply your own HTML audio element now to a player instance. This means that multiple player (or playlist) instances can share the same HTML audio element (#19).
  • A view example has been added.
  • A dedicated Playlist class has been added in favour of the WavePlayer#createPlaylist method in version 1.x.

Changed

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.

Removed

  • All waveplayer events have been removed. At the time it seemed like a good idea, but in reality everything it did can just as well be accomplished using regular JavaScript events and listeners.

Fixed

  • In version 1.x any HTML audio element related errors occurring during the loading of an audio file weren't properly handled. This should be fixed in version 2.x.

Version 1.2.4 of waveplayer.js

08 Apr 06:50
Compare
Choose a tag to compare

Changed

Update dependencies and fix security alerts.

Version 1.2.3 of waveplayer.js

15 Mar 08:16
Compare
Choose a tag to compare

Changed

Fresh build after updating dependencies.

Version 1.2.2 of waveplayer.js

24 May 06:47
Compare
Choose a tag to compare

Changed

  • A clean build after updating all dependencies

Version 1.2.1 of waveplayer.js

14 Sep 05:58
Compare
Choose a tag to compare

Bug Fixes

  • Fix a bad reference (typo) to the canvas element when removing the click handler. Thanks to @axis80.

Version 1.2.0 of waveplayer.js

30 Aug 10:35
Compare
Choose a tag to compare

Features

  • Two new public methods have been added: 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).
  • It is now possible to specify the preload attribute of the HTML audio element as an option. Previously this was hardcoded to "auto", now it defaults to "metadata".

See the README for more details

Version 1.1.0 of waveplayer.js

11 Jul 15:38
Compare
Choose a tag to compare

Bug Fixes

  • The load() method now waits for the waveplayer:canplay event to be fired before resolving.
  • Fix incorrectly setting data in drawWave() method

Features

  • Two new getters have been added to the API: currentTime 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.
  • A new option useGradient has been added to enable / disable drawing the waveform with a gradient (default is drawing with a gradient)
  • The 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.

Version 1.0.4 of waveplayer.js

18 Mar 09:27
Compare
Choose a tag to compare
  • Fix an issue where error is thrown due to bar data not being available yet
  • Update dev dependencies
  • Add more elaborate linting

Version 1.0.2 of waveplayer.js

10 Dec 12:19
Compare
Choose a tag to compare

Maintenance + small improvements.

Version 1.0.1 of waveplayer.js

10 Dec 11:58
Compare
Choose a tag to compare