mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 22:44:28 +00:00
feat(transcode): add audio file support with AAC stereo mp4 proxy and styled viewer
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user