mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-29 01:38:10 -08:00
A board takes Flash when its files say swf or flv (bbs chan board set f files swf,flv), as 4chan's /f/ did, and [chan] ruffle names Ruffle's self-hosted package (make ruffle fetches it from npm into ruffle/). - SWF: FWS and CWS read for the stage, frames, rate and sounds, the tags walked as they unpack with nothing kept (a zlib bomb costs no memory and is refused); ZWS (LZMA) taken as 550x400 with sound - FLV: onMetaData (AMF0) for size and length, the tags for sound and the video codec (Sorenson, Screen, VP6, VP6 alpha, H.264); ffmpeg thumbnails it, a movie gets a card - sound needs the board's sound; an FLV is held to max_video Clicking a Flash thumbnail plays it in a sandboxed frame (/chan/flash: allow-scripts alone, by its CSP and the frame's attribute): no origin, no cookies, nothing of the page. The page fetches the file with its own cookies and hands the bytes over; Ruffle runs with networking, scripting and links off. Ruffle 0.7.1 does not play a standalone FLV, so the BBS makes a small AVM1 movie of its own (/chan/flvplayer.swf: NetStream into a Video of the FLV's size) that plays it from a blob of the frame. Ruffle's files are served at /chan/ruffle/ with CORS open (the frame has no origin), only the package's .js, .wasm and .map. Played in Chromium with Ruffle 0.7.1: a movie, and a Sorenson FLV with sound through the player; both frames of origin "null", cookies refused, no CSP violations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr