From 159fafdb55d18ad0155ac63f80c0265f424dd00c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 19:10:10 +0000 Subject: [PATCH] feat(media): shared web helpers for byte routes, polling and studio context --- apps/web/src/lib/media-bytes.ts | 218 +++++++++++++++++++++++++++++++ apps/web/src/lib/media-poll.ts | 51 ++++++++ apps/web/src/lib/media-studio.ts | 51 ++++++++ 3 files changed, 320 insertions(+) create mode 100644 apps/web/src/lib/media-bytes.ts create mode 100644 apps/web/src/lib/media-poll.ts create mode 100644 apps/web/src/lib/media-studio.ts diff --git a/apps/web/src/lib/media-bytes.ts b/apps/web/src/lib/media-bytes.ts new file mode 100644 index 0000000..6135512 --- /dev/null +++ b/apps/web/src/lib/media-bytes.ts @@ -0,0 +1,218 @@ +import { useEffect, useState } from "react"; +import { selectedSpaceId, withSpaceHeaders } from "./rpc"; + +/* + * Media byte routes (thumbnails, proxies, render files, bundles, upload chunks). + * They need the session cookie and the space header, which an `` or + * `