feat(api): media crop endpoint for cast viewport mirror (spec 061 T001-T002) #1230
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/061-cast-crop-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec 061 backend lane (T001-T002): lets the Android cast sender mirror the phone's zoomed/panned viewport on the Chromecast Default Receiver via server-side crop.
Endpoint contract
GET /api/media/{mediaItemId}/crop
Token support (spec 060 machinery, FR-003/FR-004)
Tests
GET /api/media/{mediaItemId}/crop serves a JPEG crop of a normalized source rect (sx,sy,sw,sh in 0..1, optional maxW default/hard-max 1280) decoded from the bounded preview rendition (thumbnail fallback; the original is never decoded on this path), with Cache-Control no-store. The spec-060 media token gains rendition "crop": added to the mint whitelist and to MediaTokenAuthenticationFilter's token-capable path patterns. Binding stays item+rendition — a crop token authorizes any rect of that one item; rect params are not signed. Cookie/bearer auth is unchanged and keeps the shared viewer-permission predicate.