feat(audio): add mime to unsupported format

This commit is contained in:
Elian Doran 2026-03-11 20:29:34 +02:00
parent 2858f63873
commit 73260b91eb
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -1051,7 +1051,7 @@
"exit-picture-in-picture": "Exit picture-in-picture",
"fullscreen": "Fullscreen (F)",
"exit-fullscreen": "Exit fullscreen",
"unsupported-format": "Media preview is not available for this file format.",
"unsupported-format": "Media preview is not available for this file format:\n{{mime}}",
"zoom-to-fit": "Zoom to fill",
"zoom-reset": "Reset zoom to fill"
},

View File

@ -26,7 +26,7 @@ export default function AudioPreview({ note }: { note: FNote }) {
const onError = useCallback(() => setError(true), []);
if (error) {
return <NoItems icon="bx bx-volume-mute" text={t("video.unsupported-format")} />;
return <NoItems icon="bx bx-volume-mute" text={t("video.unsupported-format", { mime: note.mime.replace("/", "-") })} />;
}
return (

View File

@ -40,7 +40,7 @@ export default function VideoPreview({ note }: { note: FNote }) {
const onKeyDown = useKeyboardShortcuts(videoRef, wrapperRef, togglePlayback, flashControls);
if (error) {
return <NoItems icon="bx bx-video-off" text={t("video.unsupported-format")} />;
return <NoItems icon="bx bx-video-off" text={t("video.unsupported-format", { mime: note.mime.replace("/", "-") })} />;
}
return (