Journal

We built the player five times

Once the server was forbidden from seeing the stream, the player had to decode it — so we built it five times, V1 to VX, around one rule: hardware, then software, then our own decoder.

Last time, the story ended on a rule: the server may never understand the bytes it relays. Clean on a whiteboard, brutal in practice — it means a whole television decode pipeline has to run inside a browser tab. Once the server stops knowing what’s in the stream, the player has to. So we built the player. Then we built it again.

V1 worked on the demo channel and stopped on the second one. V2’s state machine lived in two files that disagreed. V3 was the clean shape — until the browser flatly refused a class of streams, and the only fix was a command-line flag we would never ask you to type. V4 shipped full of features and then silent-failed on live broadcasts: a hundred frames went into the decoder and nothing came out. V5 was a software decoder we’d kept as insurance; we turned it on by default one afternoon and off again the same evening — the same person signed both commits.

VX was the rewrite that stuck, and the release that shipped it deleted every retired engine in one squashed merge. It has exactly one rule, written at the top of the architecture doc in capital letters:

Hardware → Software → Our own decoder.

If the hardware decoder rejects the bytes, the software path takes them; below that sits our own decoder, the tier we wrote so the picture is never quietly allowed to fail. You never learn which one carried it, and you never type a flag into your browser to make television work. That’s the whole point.

None of that was the hard part. The hard part was two bugs.

Next: two bugs that were the whole story →

— Twiga team