AddThisFeature

Audio Player

Play audio files in place, with a scrubber, volume, and an honest elapsed time.

moderate Media & Video

What it adds

A compact inline audio player attached to every audio file the app already stores or links to.

What your agent is told to do

5
  1. 1

    Build one player component and use it everywhere audio appears. If the app already has Adaptive Media Source Component or a video player, extend that shared media layer rather than standing up a second, differently-behaved control.

  2. 2

    Cover the controls people expect: play and pause, a draggable scrub bar with elapsed and total time, volume with a mute toggle, and a playback speed control if the audio is spoken word.

  3. 3

    Make the whole player keyboard operable. Space toggles playback, arrow keys seek and change volume, and every control has a real accessible name rather than an unlabelled icon.

  4. 4

    Serve the audio through the app's existing file access rules. A player embedded on a private record must not expose a media URL that plays for anyone who has the link.

  5. 5

    Do not let two players sound at once. When one starts, pause every other player on the page rather than letting the user hunt for whichever one is still talking.

Edge cases it handles

8
  • A visitor who starts a track and then navigates within the app expects it to keep playing. Either hoist the player above the routed view so it survives navigation, or decide deliberately that it stops and make that stop clean rather than abrupt.
  • Buffering and paused look identical if you only toggle a play icon. Show a distinct loading state on the transport so a stalled network does not read as a broken player.
  • Some files never report a duration, either because the server does not send a length or because the stream is open-ended. Show elapsed time and a working scrubber that degrades to an unknown-length state instead of rendering a total of zero.
  • On mobile the player should register its metadata with the operating system so the lock screen and hardware media keys show the title and control playback, rather than leaving the user with a silent, unlabelled notification.
  • Browsers block autoplay with sound. A player that starts muted to dodge the block and then unmutes itself is worse than one that waits for a tap.
  • Seeking before the file has buffered that far must not reset playback to the start or throw the player into a permanent loading state.
  • A file that fails to load, is the wrong type, or has been deleted must show an error with the filename and a download link, not an inert transport with a dead play button.
  • The scrub bar needs a hit area large enough for a thumb, and dragging it must not select the surrounding page text.

Definition of done

9
  • Every audio file in the app plays through the same player component.
  • Play, pause, seek, and volume are all reachable by keyboard and correctly labelled for screen readers.
  • Starting one player pauses any other player on the page.
  • Buffering is visually distinct from paused, and files with no duration metadata still play and seek.
  • Media keys and lock-screen metadata work on mobile.
  • Audio attached to private records is not playable without the same permission the record requires.
  • A missing or unplayable file shows an error state with a fallback download.
  • 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.