A full-bleed, edge-to-edge web player that shuffle-streams the @Airwolf_C64 ("C64!") channel's 33k+ demoscene uploads ā built for an always-on Google TV Streamer display.
Open the endpoint and it autoplays a uniformly-random 50-video playlist you can skip through with the TV remote.
Video IDs are harvested into SQLite by a cron job using the cheap
playlistItems endpoint (1 quota unit per 50 videos). Each page load then
pulls a uniformly-random sample straight from the database ā zero YouTube API
quota per request.
Rendering mermaid diagram...
| File | Type | Role |
|---|---|---|
main.ts | http | Serves the player; pulls 50 random IDs from SQLite (no API call) |
harvest.ts | interval | Cron (every 6h): pages uploads into SQLite, resumes via a cursor |
db.ts | script | SQLite schema + insert / random-select helpers |
playlist.ts | script | YouTube API helpers (playlistItems paginator, search fallback), Fisher-Yates shuffle |
player.html | file | Pure full-bleed 100vw/100vh iframe (undistorted) with __FIRST_VIDEO_ID__ / __REST_VIDEO_IDS__ placeholders |
Requires a YouTube Data API v3 key in the YOUTUBE_API_KEY environment variable
(used only by the cron and the cold-start fallback ā never on a normal load).
š Add YOUTUBE_API_KEY here: https://www.val.town/x/cgio/airwolf-c64-player/environment-variables?key=YOUTUBE_API_KEY
- Cold start: if the cache is empty,
main.tsfalls back to a livesearchquery so it never serves a blank screen. Once the cron has run, the cache serves everything. - Cursor:
harvest.tsstores its playlist page token in blob storage and resumes each run, walking the whole catalog and looping back to catch new uploads. - Autoplay:
mute=0means a browser/TV may require one interaction before audio starts. - Age-restricted filtering:
harvest.tsrequestspart=snippet,contentDetailsand skips any item flaggedytRating === "ytAgeRestricted"(or whose snippet text mentions age restriction) so it never enters the SQLite cache. - Pitch-black bleed + outline reset (white hairlines):
player.htmlpaintshtml/bodyand the iframe solid#000000and applies anoutline/border/box-shadow: none !important+-webkit-tap-highlight-color: transparentreset. This is what kills the original white sub-pixel hairlines ā any fractional rendering on a high-res TV now bleeds into black instead of white, and no native focus ring contributes a stray edge. - Faithful, undistorted framing (source artifacts left as-is): the iframe is
a plain
100vw/100vhbox ā no scale/crop, no distortion. Some uploads show faint gray vertical seams and/or horizontal bands at the picture edges. These were verified to be baked into the source video files ā they reproduce identically on youtube.com (mobile and fullscreen), not just here, so no parent CSS, container, or display setting can be responsible. They're emulator/capture-pipeline artifacts (the uploader's recording region not landing on a clean pixel boundary, plus genuine C64 raster-border effects) frozen into the H.264 frames, and they sit at different positions per video. We deliberately do not crop or mask them: doing so would only work per-clip, would butcher the legitimate raster-border art that is the demoscene aesthetic, and would misrepresent the productions. An always-on demoscene shrine shows the archive faithfully ā seams and all.