Audio Postcard
ProNewPlay and scrub an audio message across a waveform with elapsed time and sender attribution.
Installation
pnpm dlx shadcn@latest add @viewport/audio-postcard
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| src* | stringAudio URL playable by the browser. | — |
| sender* | stringName shown above the message. | — |
| caption* | stringDescription of the recording. | — |
| peaks* | number[]Normalized amplitude samples from the recording. | — |
Accessibility
- Playback uses a native audio element. A labeled seek slider supports keyboard input and playback errors are announced.