waveplayer

An HTML5 based audio player with a waveform view

MIT License

Stars
79
Committers
2
waveplayer - Version 2.0.0 of waveplayer Latest Release

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.

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.
waveplayer - Version 1.2.4 of waveplayer.js

Published by michaeldzjap over 4 years ago

Changed

Update dependencies and fix security alerts.

waveplayer - Version 1.2.3 of waveplayer.js

Published by michaeldzjap over 4 years ago

Changed

Fresh build after updating dependencies.

waveplayer - Version 1.2.2 of waveplayer.js

Published by michaeldzjap over 5 years ago

Changed

  • A clean build after updating all dependencies
waveplayer - Version 1.2.1 of waveplayer.js

Published by michaeldzjap about 6 years ago

Bug Fixes

  • Fix a bad reference (typo) to the canvas element when removing the click handler. Thanks to @axis80.
waveplayer - Version 1.2.0 of waveplayer.js

Published by michaeldzjap about 6 years ago

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

waveplayer - Version 1.1.0 of waveplayer.js

Published by michaeldzjap over 6 years ago

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.

waveplayer - Version 1.0.4 of waveplayer.js

Published by michaeldzjap over 6 years ago

  • Fix an issue where error is thrown due to bar data not being available yet
  • Update dev dependencies
  • Add more elaborate linting
waveplayer - Version 1.0.2 of waveplayer.js

Published by michaeldzjap almost 7 years ago

Maintenance + small improvements.

waveplayer - Version 1.0.1 of waveplayer.js

Published by michaeldzjap almost 7 years ago

Bump version

waveplayer - Version 1.0.0 of waveplayer.js

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.

waveplayer - Version 0.1.1 of waveplayer.js

Published by michaeldzjap almost 7 years ago