Mediathek docs

Decisions

ADR-0005 — Media reaches the browser through CloudFront, with one signed policy per session

Status: Accepted · Date: 2026-09-29

Context

The Mediathek shows hundreds of thumbnails per screen and, from phase 3, films as HLS: a playlist that the player follows to hundreds of segment files. The template's pattern (ADR-0004), where a Lambda presigns one S3 GET per object, does not fit either case. It costs a round trip per thumbnail, and an HLS player requests URLs the page never sees, so it cannot presign them.

The obvious CloudFront answer is signed cookies. But cookies are only sent to the domain that set them. A site on mediathek.digitalhome.cloud cannot set a cookie for dxxxx.cloudfront.net, and a media sub-domain needs a certificate in us-east-1 plus DNS. Neither exists for a personal sandbox on localhost.

Decision

Consequences