Skip to content

🎥 Make videos programmatically with React

Release waveform progress snapshot after loading

Jonny Burgerebb8cbdb4775
diff --git a/packages/timeline-utils/src/audio-waveform/subscribe-to-waveform-peaks.ts b/packages/timeline-utils/src/audio-waveform/subscribe-to-waveform-peaks.ts
index af13afae2f..6f2be3091a 100644
--- a/packages/timeline-utils/src/audio-waveform/subscribe-to-waveform-peaks.ts
+++ b/packages/timeline-utils/src/audio-waveform/subscribe-to-waveform-peaks.ts
@@ -34,6 +34,7 @@ let nextRequestId = 0;
const emitPeaks = (load: InFlightLoad, peaks: Float32Array, final: boolean) => {
if (final) {
peaksCache.set(load.cacheKey, peaks);
+ load.latestPeaks = null;
inFlightByCacheKey.delete(load.cacheKey);
if (load.requestId !== null) {
inFlightByRequestId.delete(load.requestId);