Browse Source
The thumbnail extraction effect had three issues compounding on weak hardware: 1. The onseeked promise had no timeout — if seek hangs on systems without hardware video decoding, the entire effect blocks indefinitely. Added 10-second Promise.race timeout. 2. Created video elements were never cleaned up after use, leaving phantom decoders running. Added cleanupVideo() that nulls handlers, clears src, and calls load(). 3. The thumbnail cache was cleared wholesale on every run (thumbnailsRef.current = new Map()), making the cache check on the next line always miss. Replaced with fingerprint-based invalidation: only clips whose video data actually changed get re-extracted, reusing cached thumbnails for unchanged clips. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>handoff-20260429-1057
1 changed files with 33 additions and 9 deletions
Loading…
Reference in new issue