diff --git a/src/components/TrimControl.tsx b/src/components/TrimControl.tsx
index d48bdd69..a66d0fc5 100644
--- a/src/components/TrimControl.tsx
+++ b/src/components/TrimControl.tsx
@@ -25,7 +25,11 @@ export default function TrimControl({ recipe, onChange, duration, file }: Props)
recipe.trimStart.toString()
);
- const { waveform, isLoading: waveformLoading } = useAudioWaveform(file);
+ const {
+ waveform,
+ status: waveformStatus,
+ isLoading: waveformLoading,
+ } = useAudioWaveform(file);
const hasAudio = waveform.length > 0;
useEffect(() => {
@@ -235,6 +239,30 @@ export default function TrimControl({ recipe, onChange, duration, file }: Props)
/>
)}
+
+ {file && (
+
+ {waveformStatus === "disabled" ? (
+
+
+ Waveform preview is disabled for very large files to keep the
+ editor responsive.
+
+
+ ) : (
+
+ )}
+
+ )}
+