Media attachment cards with popover players and shared volume

- Audio/video attachments render as media cards (cover or icon,
  title/artist/size) instead of plain file chips; image attachments
  use 3:2 thumbnails matching the audio card height
- Players open in a Popover (autoplay on open) with a dimming
  overlay; AudioPlayerDialog/VideoPlayerDialog removed
- New useMediaVolume composable shares volume/mute between all
  audio players and Plyr via the 4brett-player storage key
- Player buttons and Plyr controls follow the theme border radius
- Portrait videos: aspect is applied even when metadata loaded
  before hydration, and the raw video is height-capped pre-JS

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
2026-10-04 03:06:11 +02:00
co-authored by Devin
parent cd04135463
commit fe9e723c72
6 changed files with 154 additions and 167 deletions
+5
View File
@@ -28,6 +28,11 @@ export function isAudioAttachment(a: { mimeType?: string | null, name?: string }
|| (!!a.name && /\.(mp3|flac|ogg|wav|m4a|aac|opus)$/i.test(a.name))
}
export function isVideoAttachment(a: { mimeType?: string | null, name?: string }): boolean {
return !!a.mimeType?.startsWith('video/')
|| (!!a.name && /\.(mp4|webm|mov|mkv|avi|m4v|mpg|mpeg|ts|mts)$/i.test(a.name))
}
export function isVoiceAttachment(a: { meta?: { voice?: boolean } | null }): boolean {
return a.meta?.voice === true
}