Zero-config audio waveforms for the web. Add a data- attribute to any <div> and get a real, interactive waveform player.
- No build step, no dependencies. Vanilla JS, about 15 KB gzipped.
- Six waveform styles, themeable with CSS.
- Keyboard control and Media Session out of the box.
- Extensions for a site-wide bar, playlists, sample-pack browsing and listen analytics.
- Components for Astro, React, Svelte and Vue.
<link rel="stylesheet" href="https://unpkg.com/@arraypress/waveform-player/dist/waveform-player.css">
<script src="https://unpkg.com/@arraypress/waveform-player/dist/waveform-player.min.js"></script>
<div data-waveform-player data-url="track.mp3" data-title="My Song" data-artist="The Artist"></div>Or from npm:
npm install @arraypress/waveform-playerimport WaveformPlayer from '@arraypress/waveform-player';
new WaveformPlayer('#player', { url: 'track.mp3', title: 'My Song', artist: 'The Artist' });|
WaveformPlayer Canvas waveform player with six styles, keyboard control and Media Session. |
WaveformBar A persistent bottom bar: queue, volume, repeat, favourites, cart and cross-page sessions. |
WaveformPlaylist Playlists and chapters for podcasts, courses, albums and audiobooks. |
|
WaveformSounds A searchable, filterable sound list for sample packs, with a mini waveform per row. |
WaveformTracker Privacy-first listen analytics that count real listening time. No cookies. |
WaveformGen A Node CLI and library that pre-generates waveform peaks and BPM from audio files. |
One package per framework, with a sub-path per component: /player, /bar, /playlist and /sounds. Install only the cores you use.
Astro |
React |
Svelte |
Vue |
|---|---|---|---|
| astro npm |
react npm |
svelte npm |
vue npm |
import { WaveformPlayer } from '@arraypress/waveform-react/player';