package main // waveformPlayerComponent renders a Soundcloud-style horizontal player. The // canvas waveform is filled client-side from the audio source using WebAudio // peak decode (v0.1 strategy noted in the spec's open questions). templ waveformPlayerComponent(data WaveformPlayerData) {
if data.CoverImage != "" { { } else { }
{ trackTitleOr(data.TrackTitle) } if data.Artist != "" { { data.Artist } }
if data.AudioURL != "" { } else {

No audio source configured.

}
} func trackTitleOr(s string) string { if s == "" { return "untitled track" } return s }