feat(transcode): add audio file support with AAC stereo mp4 proxy and styled viewer

This commit is contained in:
yiling
2026-07-05 15:11:19 +08:00
parent 9a7abaed1a
commit a2e982f2e6
18 changed files with 577 additions and 105 deletions
@@ -1,4 +1,4 @@
import { File, Folder } from 'lucide-react'
import { File, Folder, AudioLines } from 'lucide-react'
import { SpriteScrubber } from '../sprite-scrubber'
import { formatTime } from '../viewers/video/utils'
@@ -63,6 +63,15 @@ export const FilePreview = ({ item, showDuration = false }: FilePreviewProps) =>
)
}
const isAudio = item.preview?.mediaType?.startsWith('audio/')
if (isAudio) {
return (
<div className="w-full h-full flex items-center justify-center bg-muted">
<AudioLines className="w-8 h-8 text-muted-foreground" />
</div>
)
}
// Assumption: folders in latestChildren have no media type.
if (!item.type) {
return (