feat: accept any audio/video upload, server converts to 6s compressed MP3
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m44s
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m44s
This commit is contained in:
@@ -305,7 +305,7 @@ export function ItemEditor({ campaign }: { campaign: Campaign }) {
|
||||
<input
|
||||
ref={fileInputRef}
|
||||
type="file"
|
||||
accept=".ogg"
|
||||
accept="audio/*,video/*"
|
||||
className="hidden"
|
||||
onChange={e => { const f = e.target.files?.[0]; if (f) uploadSound(f); }}
|
||||
/>
|
||||
|
||||
@@ -79,7 +79,7 @@ function SoundsTab() {
|
||||
} catch {}
|
||||
setUploading(false);
|
||||
},
|
||||
accept: { "audio/ogg": [".ogg"] },
|
||||
accept: { "audio/*": [".mp3", ".ogg", ".wav", ".flac", ".aac", ".m4a", ".wma", ".opus", ".webm"], "video/*": [".mp4", ".avi", ".mov", ".mkv", ".webm", ".wmv", ".flv"] },
|
||||
multiple: true,
|
||||
});
|
||||
|
||||
@@ -133,7 +133,7 @@ function SoundsTab() {
|
||||
|
||||
<div {...getRootProps()} className="border-2 border-dashed border-slate-700/40 rounded-lg p-3 text-center cursor-pointer hover:border-cyan-600/40 transition-colors">
|
||||
<input {...getInputProps()} />
|
||||
<p className="text-[10px] font-mono text-slate-500">Drop OGG files here or click to upload</p>
|
||||
<p className="text-[10px] font-mono text-slate-500">Drop audio/video files here or click to upload</p>
|
||||
</div>
|
||||
|
||||
{/* Library */}
|
||||
|
||||
Reference in New Issue
Block a user