immich/web/src/lib
Min Idzelis 4aa31d38bf
fix(web): svelte regression - cancel video preview fetch when bind:this is cleared early (#27713)
fix(web): cancel video preview fetch when bind:this is cleared early

In Svelte 5.53.9, `bind:this` is now cleared earlier in the unmount
sequence ("better bind:this cleanup timing"). The video thumbnail's
$effect was relying on the old order to read the bound `player` element
and clear its `src` to abort the in-flight `/api/assets/{id}/video/playback`
range request — but the bind is now `undefined` by the time the effect
runs, so the cleanup is silently skipped. The detached <video> keeps
its src, and Firefox does not abort an in-flight media fetch when the
element is detached/GC'd. Long-lived 206 range requests then saturate
Firefox's 6-connection HTTP/1.1 per-host limit and freeze the timeline
(see #27585).

Capture the player reference inside the effect and tear down via the
effect cleanup return — Svelte runs the prior cleanup (with the captured
ref) before `bind:this` is cleared. Use the canonical
`pause() / removeAttribute('src') / load()` sequence which actually aborts
the fetch in Firefox, even on a detached element.

Fixes #27585

Change-Id: I4d9fba859955f5c54f603c345e61d4206a6a6964
2026-04-15 20:18:59 -05:00
..
__mocks__ chore: vitest 4 for web, cli, and e2e (#26668) 2026-03-04 14:19:13 +00:00
actions refactor(web): turn thumbhash action into Thumbhash component (#27741) 2026-04-15 20:18:49 -05:00
assets chore: update PWA support (#26491) 2026-03-02 11:35:53 +00:00
attachments feat: workflow ui (#24190) 2025-12-20 21:07:07 -06:00
components fix(web): svelte regression - cancel video preview fetch when bind:this is cleared early (#27713) 2026-04-15 20:18:59 -05:00
elements feat(web): remove delay from Skeleton (#27580) 2026-04-14 12:47:37 -04:00
managers feat: auth logout page (#27831) 2026-04-15 16:33:52 -04:00
modals chore!: remove without assets (#27835) 2026-04-15 18:34:22 -04:00
services fix(web): add partner photo to album from multiselect (#27767) 2026-04-14 16:48:39 +00:00
stores feat: auth logout page (#27831) 2026-04-15 16:33:52 -04:00
utils feat: auth logout page (#27831) 2026-04-15 16:33:52 -04:00
commands.ts feat: upgrade immich/ui (#27792) 2026-04-14 16:18:12 +00:00
constants.ts feat: upgrade immich/ui (#27792) 2026-04-14 16:18:12 +00:00
i18n.spec.ts feat: use prettier for i18n translations (#24623) 2026-01-06 15:02:10 +00:00
index.spec.ts refactor: change location (#27201) 2026-03-26 13:22:14 -04:00
index.ts refactor: change location (#27201) 2026-03-26 13:22:14 -04:00
route.spec.ts refactor(web): routes (#25365) 2026-01-19 12:07:31 -05:00
route.ts feat: auth logout page (#27831) 2026-04-15 16:33:52 -04:00
types.ts refactor: change location (#27201) 2026-03-26 13:22:14 -04:00
utils.spec.ts fix: use correct original URL for 360 video panorama playback (#26831) 2026-03-12 21:27:44 +01:00
utils.ts fix(web): stop in-progress uploads on logout (#27021) 2026-03-19 13:05:11 -04:00