# Controlled waveform

With `mode: "controlled"` there is no audio element: the component draws a play button, a bar waveform and the duration from data, and reports presses through `onToggle({ playing })` (the state the page should move to). The page owns playback and feeds `playing` and `progress` back with `setPlaying` and `setProgress`; the bars up to `progress` draw as played. `peaks` (0 to 1) are resampled to `bars`, and `locale` draws the duration digits.
