Replace PreviewOverlay's bare <video controls> with a vidstack-driven player wrapping the same source URL. Vidstack's default video layout provides a polished chrome (gradient bottom bar, large play overlay, hover-revealed scrubber) and registers <media-player>/<media-provider> custom elements that vendor the browser quirks. To keep first-frame latency low, PhotoTile starts a hover-warm fetch of the playback URL after a short (120 ms) delay — a single Range request of the first 512 KB pages the backend's pre-transcoded MP4 cache file into the OS page cache and lands in the browser's HTTP cache, so when the player mounts and issues its own bytes=0- request the response is satisfied from disk. Each hash is warmed at most once per session; AbortController cancels hovers that don't commit. The vidstack modules are dynamically imported on mount so they never run during SvelteKit's static prerender — they side-effect customElements.define() calls which would crash under SSR.
41 lines
1.0 KiB
JSON
41 lines
1.0 KiB
JSON
{
|
|
"name": "web",
|
|
"private": true,
|
|
"version": "0.0.1",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"prepare": "svelte-kit sync || echo ''",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
|
},
|
|
"devDependencies": {
|
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
"@sveltejs/kit": "^2.57.0",
|
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
"@tailwindcss/vite": "^4.3.0",
|
|
"@types/node": "^25.8.0",
|
|
"svelte": "^5.55.2",
|
|
"svelte-check": "^4.4.6",
|
|
"tailwindcss": "^4.3.0",
|
|
"typescript": "^6.0.2",
|
|
"vite": "^8.0.7"
|
|
},
|
|
"dependencies": {
|
|
"@tanstack/svelte-query": "^6.1.29",
|
|
"@tanstack/svelte-virtual": "^3.13.24",
|
|
"axios": "^1.16.1",
|
|
"bits-ui": "^2.18.1",
|
|
"clsx": "^2.1.1",
|
|
"lucide-svelte": "^1.0.1",
|
|
"maplibre-gl": "^5.24.0",
|
|
"mode-watcher": "^1.1.0",
|
|
"svelte-sonner": "^1.1.1",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tailwind-variants": "^3.2.2",
|
|
"vidstack": "^1.12.13"
|
|
}
|
|
}
|