Web Components — Player
<daw-player> is a lightweight single-track player from @dawcore/components: it wraps an HTMLMediaElement, so audio streams instead of decoding into memory — no Tone.js, no engine, no AudioContext to manage. Click the waveform to seek.
Loading...
What's in it
srcstreams through anHTMLMediaElement— instant start, no full decodepeaks-srcrenders a waveform from pre-computed BBCaudiowaveformpeaks (.dat/.json); without it the player falls back to a scrubber bartimescaleadds the time ruler;wave-height,bar-width/bar-gap,monoand the--daw-*CSS custom properties handle presentation- Methods:
play(),pause(),stop(),seekTo(s),setPlaybackRate(r),setVolume(v) - Events:
daw-ready,daw-play,daw-pause,daw-stop,daw-timeupdate({ time }),daw-ended,daw-error— the readout above is driven by them
Run it locally
The same example as a standalone Vite app: pnpm example:dawcore-native → opens examples/dawcore-native/player.html.