| 1 | /** Native playback controls for a captured or workspace audio file. */ |
| 2 | export function AudioPreview(props: { |
| 3 | readonly src: string; |
| 4 | readonly name: string; |
| 5 | readonly onError?: () => void; |
| 6 | }) { |
| 7 | return ( |
| 8 | <div className="flex min-h-0 flex-1 items-center justify-center p-6"> |
| 9 | <audio |
| 10 | controls |
| 11 | preload="metadata" |
| 12 | src={props.src} |
| 13 | aria-label={props.name} |
| 14 | className="w-full max-w-xl" |
| 15 | onError={props.onError} |
| 16 | /> |
| 17 | </div> |
| 18 | ); |
| 19 | } |