trying to fix export issue and waveform load

This commit is contained in:
2026-04-15 21:51:05 -06:00
parent 168676a9e9
commit 0c7a4c94c2
6 changed files with 157 additions and 45 deletions

View File

@ -354,7 +354,11 @@ export default function WaveformTimeline({
encodedPath: encodeURIComponent(videoPath ?? ''),
});
const waveformUrl2 = `${backendUrl}/audio/waveform?path=${encodeURIComponent(videoPath ?? '')}`;
setAudioError(`Waveform unavailable — ${err instanceof Error ? err.message : 'audio could not be decoded'} [URL: ${waveformUrl2}]`);
const errMessage = err instanceof Error ? err.message : 'audio could not be decoded';
const userMessage = errMessage === 'Load failed'
? `Cannot reach backend at ${backendUrl}. Start the backend server and reload the project.`
: errMessage;
setAudioError(`Waveform unavailable — ${userMessage} [URL: ${waveformUrl2}]`);
}
};