diff --git a/frontend/src/components/video/MetadataBox.tsx b/frontend/src/components/video/MetadataBox.tsx index f2308b9..a959932 100644 --- a/frontend/src/components/video/MetadataBox.tsx +++ b/frontend/src/components/video/MetadataBox.tsx @@ -9,9 +9,12 @@ type Props = { const MetadataBox = ({ setMetadata, className }: Props) => (
Title
++ Title * +
setMetadata(prev => ({ ...prev, title: e.target.value }))} className="border border-hairline bg-fields rounded-md w-full p-2 text-sm focus:outline-none focus:ring-2 focus:ring-muted transition-colors" diff --git a/frontend/src/pages/ClipEdit.tsx b/frontend/src/pages/ClipEdit.tsx index 267f836..f40362e 100644 --- a/frontend/src/pages/ClipEdit.tsx +++ b/frontend/src/pages/ClipEdit.tsx @@ -64,12 +64,18 @@ const ClipEdit = () => { const sendData = async () => { if (!localFile || uploading) return; + const title = outputMetadata.title.trim(); + if (!title) { + setError('A title is required before exporting.'); + return; + } + setUploading(true); setError(null); let jobId: string; try { - jobId = await compress(localFile, outputMetadata); + jobId = await compress(localFile, { ...outputMetadata, title }); setUploadedId(jobId); } catch (err: unknown) { setError(`Failed to start compression: ${err instanceof Error ? err.message : 'Unknown error'}`);