Browse Source
getVideoDimensions created a <video> element for dimension detection but never cleaned it up, leaving a phantom decoder running alongside the visible video. On systems with weak GPUs (e.g. Intel HD 5500), this compounds with autoPlay loop to overwhelm Chrome's main thread. - Add cleanup helper that nulls handlers, clears src, and calls load() - Add video.preload = "metadata" to avoid fetching full video content - Add 10-second timeout that cleans up and resolves null if metadata never loads (graceful degradation: node keeps current size) - Apply same cleanup pattern to getImageDimensions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>handoff-20260429-1057
1 changed files with 32 additions and 3 deletions
Loading…
Reference in new issue