fix: show user-friendly error for unsupported video codecs (#637)
When a video file uses a codec not supported by WebCodecs (like H.265/HEVC from Clipchamp), show a helpful toast message suggesting to convert to H.264/MP4 format instead of failing silently. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
71bdafac75
commit
edd2138c6b
|
|
@ -195,6 +195,13 @@ export async function processMediaAssets({
|
|||
});
|
||||
} catch (error) {
|
||||
console.warn("Video processing failed", error);
|
||||
const errorMessage =
|
||||
error instanceof Error ? error.message : String(error);
|
||||
if (errorMessage.includes("codec not supported")) {
|
||||
toast.error(
|
||||
`${file.name}: Video codec not supported. Try converting to H.264/MP4 format.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if (fileType === "audio") {
|
||||
// For audio, we don't set width/height/fps (they'll be undefined)
|
||||
|
|
|
|||
Loading…
Reference in New Issue