Audio player using Web Audio API.
npm install web_audio_playerFeatures:
* No UI. Yeap, it's a feature. You can create any markup you wish, style it
as you wish, and just use JS methods and events to control the playback.
* 10-bands equalizer.
* Rememberable settings using localStorage.
* Playlists.
* URL mirrors. Instead of one URL you can supply an array of them. The first
one that resolves will be decoded.
* Easy events subscription.
* Time markers. These are callbacks that are executed after specified amount
of playback time.
* Also the volume control, repeatable lists, play / stop / pause / seek / next /
previous / shuffle methods, various time getters, and many more.
To submit bug reports and feature suggestions, or to track changes:
https://github.com/mikeshiyan/WebAudioPlayer/issues
There are multiple ways to download the library to your project.
* With NPM:
npm install --save web_audio_player
* With Bower:
bower install --save web_audio_player
* With JSPM:
jspm install web_audio_player=github:mikeshiyan/WebAudioPlayer
* Downloading or cloning the library directly from
GitHub.
Whichever way you choose to install, you'll get a 'dist' directory with multiple
JS files. Each of them is the full library with the same functionality, just in
different format. So only one of them needs to be included in your project:
* web_audio_player.es6.js is the most "human-readable" one. Uses strict
ECMAScript 2015 language
syntax. Defines the global WebAudioPlayer class.
* web_audio_player.js is the transpiled version of the above for browsers
that do not support ECMAScript 2015 syntax yet. Again the WebAudioPlayer
class is available in the global scope.
* web_audio_player.min.js is the minified version of the above to load less
bytes by browsers. The WebAudioPlayer class is still available as the global
one.
* web_audio_player.common.js is the
CommonJS module. Based on the
transpiled but not minified version above. To get the WebAudioPlayer class
in your code:
var WebAudioPlayer = require('web_audio_player');
WebAudioPlayervar player = new WebAudioPlayer();
Let this instance be a single for your project - store the variable somewhere
your code will be able to get it, to not instantiate a new object.
Now you may use public methods of the library to load audio files, control the
playback, etc. See demo and the API.