AddThisFeature

Audio Waveform Scrubber

Show the shape of a track so listeners can see the quiet and loud parts and click to them.

moderate Media & Video

What it adds

A waveform rendered from precomputed amplitude data, doubling as the seek control on the audio player.

What your agent is told to do

5
  1. 1

    Compute the amplitude data on the server when the file is first stored, and serve it as a small dataset the page can draw. Do not decode the audio in the browser to build the waveform.

  2. 2

    Replace the plain scrub bar in the app's existing Audio Player with this surface rather than adding a second seek control beside it.

  3. 3

    Draw played and unplayed regions distinctly, and keep the playhead position exact under click, drag, and keyboard seeking on the same surface.

  4. 4

    Reserve the waveform's height and width before the data arrives and show a placeholder in that space, so the player does not resize when it loads.

  5. 5

    Do not make the waveform the only way to seek. Keep the elapsed and total time readable and keyboard seeking available, because a waveform is unusable to anyone who cannot see it.

Edge cases it handles

8
  • Decoding audio in the browser to draw a waveform blocks the main thread and downloads the whole file before playback can start. Precompute once at upload and reuse the result for every listener.
  • A canvas drawn at layout size looks blurry on high-density screens and stretches on resize. Redraw at the device pixel ratio, and redraw again when the container width changes rather than scaling the existing bitmap.
  • Waveform data arrives after the player does. Show a neutral placeholder of the right dimensions in the meantime and keep the player fully usable, rather than blocking playback on a decorative asset.
  • Distinguishing played from unplayed by colour alone fails for colour-blind listeners and in high-contrast mode. Vary opacity, height, or fill as well.
  • Click, drag, and keyboard must all seek the same surface. Dragging must not select surrounding text, and releasing outside the waveform must still resolve to a sensible position rather than leaving the player stuck in a drag.
  • A file with no computed waveform, or one still being processed, must fall back to the plain scrub bar rather than showing an empty box.
  • Very long recordings compress thousands of samples into a few hundred columns. Fix the number of columns to the drawn width so the data volume does not grow with duration.
  • The waveform needs an accessible role and value so a screen reader announces the position as a slider, not as an unlabelled image.

Definition of done

9
  • Waveform data is computed server-side at upload and served as a compact dataset.
  • The waveform is the player's seek control, not a second one alongside it.
  • Click, drag, and keyboard seeking all work on the same surface and land on the same position.
  • Played and unplayed regions are distinguishable without relying on colour.
  • The waveform redraws sharply on resize and on high-density displays.
  • A placeholder of the correct dimensions shows while data loads, with no layout shift.
  • Files with no waveform data fall back to the plain scrub bar and remain playable.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.