diff --git a/web/src/lib/components/assets/thumbnail/video-thumbnail.svelte b/web/src/lib/components/assets/thumbnail/video-thumbnail.svelte index 76956fbb26..db5ecdefa7 100644 --- a/web/src/lib/components/assets/thumbnail/video-thumbnail.svelte +++ b/web/src/lib/components/assets/thumbnail/video-thumbnail.svelte @@ -36,14 +36,18 @@ $effect(() => { if (!enablePlayback) { - // Reset remaining time when playback is disabled. remainingSeconds = durationInSeconds; - - if (player) { - // Cancel video buffering. - player.src = ''; - } + return; } + if (!player) { + return; + } + const video = player; + return () => { + video.pause(); + video.removeAttribute('src'); + video.load(); + }; }); const onMouseEnter = () => { if (playbackOnIconHover) {