High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(web): svelte regression - cancel video preview fetch when bind:this is cleared early (#27713)
Min Idzelis4aa31d38bfde
diff --git a/web/src/lib/components/assets/thumbnail/video-thumbnail.svelte b/web/src/lib/components/assets/thumbnail/video-thumbnail.svelteindex 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) {