A single static HTML file that streams directly from a Plex server over the car's Wi-Fi or LTE, with touch targets sized for driving gloves and a color palette that disappears into the dashboard. Zero dependencies, no build step, ~60 KB of HTML, CSS, and JavaScript talking to the Plex REST API directly from the browser.
Credentials stay in localStorage, encrypted with AES-256-GCM and
unlocked with a passphrase โ a shared car never has the library token in plaintext
on disk.
Tesla ships Spotify, TIDAL, and a few others โ but none of them see a self-hosted Plex library. Lossless FLACs, niche live recordings, ripped CDs, the post-rock archive that doesn't stream anywhere โ all of it lives on Plex. This is the bridge.
Driving through canyons, tunnels, or out-of-coverage stretches would normally kill streaming playback. So the player aggressively pre-caches upcoming tracks in the background: while you're listening to track 1, tracks 2โ5 are already decoded and sitting in memory as Blob URLs, ready to play the instant you hit next โ or the instant the car loses signal.
All transcode requests route through a single global queue with a 5-second gap between requests. Plex only tolerates one transcode per client ID at a time; anything parallel causes truncated audio.
Chromium (Tesla) holds up to 10 MP3 blobs (~5 MB each, ~50 MB total). Safari caches 3 decoded WAVs (~40 MB each) to sidestep its audio limits.
Because the next track is already decoded, skipping is effectively instant โ no network round-trip, no transcode wait. Not true gapless, but close.
Frame-based validation on every download. Short files (especially long live recordings) auto-retry once in the same cache slot; double failures self-heal on the next cycle.
Album art thumbnails are preloaded into the browser image cache during track pre-cache, so the "Now Playing" view never shows a broken image when signal drops.
Listens to the browser's online/offline events. When the car drops signal mid-drive, cached tracks keep playing; reconnect is transparent when signal returns.
Tesla allows audio while driving but blocks video playback. The player is <audio>-only by design โ no HTML5 video element ever.
Everything is sized for a phone-sized thumb through a glove. No dropdowns, no hover states, no tooltips โ tap targets are 48px+ minimum.
Near-black background with soft foreground contrast. Designed to blend with the dashboard at night and reduce glare during daytime driving.
Artists, albums, playlists, recently added. Full-library search across artists, albums, and tracks โ results paginated and lazily loaded.
Build a play queue, reorder, shuffle, or just let the current album ride out. Queue state survives page reloads via localStorage.
Server URL, relay URL, and Plex token are sealed in an AES-256-GCM blob in localStorage. Unlock with a passphrase โ nothing in plaintext on disk.
Pure web app. Open the URL in Tesla's browser, unlock, and drive. No pairing, no Bluetooth, no aux.
A Pages Function that asks Claude Haiku to build a 30-track queue from a mood or free-text prompt, using the user's actual Plex library as context. The browser sends the prompt + Plex token to the function; the function pulls library metadata (artists, genres, play counts), asks Claude for a ranked artist/genre list, then materializes that into a real track queue from Plex. Tap a preset or type whatever you want to hear.
Single index.html (~60 KB, zero deps) served from Cloudflare Pages ยท
Plex REST API over HTTPS ยท Web Crypto for AES-256-GCM with PBKDF2
(100k iterations, SHA-256) ยท localStorage for encrypted credential blob
and queue state ยท Pages Functions + Claude Haiku for the AI DJ.