feat(file-browser): show video duration on file card preview

Display the video duration (mm:ss) in the bottom-right corner of the
video file card preview area with white text and a transparent
background. Duration is sourced from media metadata and exposed via the
preview DTO. The overlay is gated behind a showDuration prop so it only
appears on file cards, not folder card child previews.
This commit is contained in:
yiling
2026-07-03 20:48:26 +08:00
parent 06df7537e0
commit d3efc00902
5 changed files with 90 additions and 15 deletions
+1
View File
@@ -13,6 +13,7 @@ export const previewInfoSchema = z.object({
originalHeight: z.number().optional(),
originalWidth: z.number().optional(),
spriteUrl: z.string().optional(),
duration: z.number().optional(),
})
export type PreviewInfo = z.infer<typeof previewInfoSchema>