Wavesurfer.js is an interactive waveform rendering and audio playback library for web applications.
The library solves the problem of displaying and interacting with audio waveforms in the browser. It renders waveforms visually and allows users to play, seek, and control audio playback through an intuitive interface. The approach leverages modern web technologies and the Web Audio API to provide real-time waveform visualization synchronized with audio playback.
Wavesurfer.js suits web applications that need to present audio with visual feedback, such as music players, podcast platforms, audio editors, or educational tools. The library includes TypeScript types built-in, supports both module import and UMD script tag inclusion, and offers a plugin architecture for extending functionality. Official plugins provide regions for marking audio sections, timeline displays, minimap navigation, envelope controls for fade effects, microphone recording with waveform rendering, spectrogram visualization, and hover tooltips. Beyond event-driven programming, the tool exposes a reactive API using signals for reading state like current playback time, volume, and mute status, which suits applications that prefer reading state over tracking events.
The project maintains active development with regular updates to its core functionality and plugin ecosystem. The maintainers provide comprehensive documentation including beginner-friendly guides, practical examples, and a full API reference. The codebase is written in TypeScript and includes a test suite. The project accepts community feedback and maintains official plugins alongside the core library.