Interactive navigable audio visualization using Web Audio and Canvas
npm install @abrahamian/wavesurfer.js
!npm 
Interactive navigable audio visualization using Web Audio and Canvas.

See a tutorial and examples on wavesurfer-js.org.
It will fallback to Audio Element in other browsers (without graphics). You can also try wavesurfer.swf which is a Flash-based fallback.
backend: 'MediaElement' option. See here: https://wavesurfer-js.org/example/audio-element/. The audio will start playing as you press play. A thin line will be displayed until the whole audio file is downloaded and decoded to draw the waveform.Choose a container:
``html`
Create an instance, passing the container selector and options:
`javascript`
var wavesurfer = WaveSurfer.create({
container: '#waveform',
waveColor: 'violet',
progressColor: 'purple'
});
Subscribe to some events:
`javascript`
wavesurfer.on('ready', function () {
wavesurfer.play();
});
Load an audio file from a URL:
`javascript`
wavesurfer.load('example/media/demo.wav');
See the documentation on all available methods, options and events on the homepage.
See the upgrade document if you're upgrading from a previous version of wavesurfer.js.
Wavesurfer can be used with a module system like this:
`javascript
// import
import WaveSurfer from 'wavesurfer.js';
// commonjs/requirejs
var WaveSurfer = require('wavesurfer.js');
// amd
define(['WaveSurfer'], function(WaveSurfer) {
// ... code
});
`
For a list of projects using wavesurfer.js, check out
the projects page.


!Size
Install development dependencies:
``
npm installstart
Development tasks automatically rebuild certain parts of the library when files are changed ( – wavesurfer, start:plugins – plugins). Start a dev task and go to localhost:8080/example/ to test the current build.
Start development server for core library:
``
npm run start
Start development server for plugins:
``
npm run start:plugins
Build all the files. (generated files are placed in the dist directory.)
``
npm run build
Running tests only:
``
npm run test
Build documentation with esdoc (generated files are placed in the doc directory.)``
npm run doc
If you want to use the VS Code - Debugger for Chrome, there is already a launch.json with a properly configured sourceMapPathOverrides for you.
Initial idea by Alex Khokhulin. Many
thanks to
the awesome contributors!

This work is licensed under a
BSD 3-Clause License.