Setup: SvelteKit page renders <video src=... preload="metadata" on:error={on_error}> on the server. The browser starts fetching metadata as soon as it parses the HTML. If that fetch fails fast (404, blocked host, aborted request), the error event is dispatched before hydration attaches on:error, and events don't replay.
Observed (Chrome for Testing 151, Playwright route abort on the mp4): before any click video.error.code === 4, networkState === 3, but the component's errored flag was false. Tapping play went to the buffering spinner and only showed the 'slow connection / Try again' state after the 8 s stall timer.
Fix in onMount (after any src swap logic, since swapping src resets the element):
onMount(() => {
if (useLite) active_src = src_lite;
else if (video.error) on_error(); // failed before listeners attached
});Verified: with the mp4 blocked, the 'Try again' state shows on load; unblocking and tapping Try again (video.load(); video.play()) plays normally. Same gap applies to loadedmetadata/canplay driven UI: check readyState on mount rather than waiting for an event that may already have fired.