From b0055277f3f58f789e5ea8bb18d297cafbfe5e44 Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Sat, 25 Jul 2026 10:41:14 +0100 Subject: [PATCH] feat(player): adjust frontend to use raw source --- frontend/src/App.tsx | 8 +++---- frontend/src/pages/MediaPlayer.tsx | 34 ++++++++++++++++++------------ frontend/src/utils/api/clips.ts | 16 +++++--------- frontend/src/utils/api/vods.ts | 16 +++++--------- 4 files changed, 35 insertions(+), 39 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b6dc24d..17b39f5 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -8,8 +8,8 @@ import {useEffect} from "react"; import MyClips from './pages/MyClips'; import MyVods from './pages/MyVods'; import MediaPlayer from "./pages/MediaPlayer.tsx"; -import { getVodById, getVodBlob } from "./utils/api/vods.ts"; -import { getClipById, getVideoBlob } from "./utils/api/clips.ts"; +import { getVodById, getVodMediaUrl } from "./utils/api/vods.ts"; +import { getClipById, getClipMediaUrl } from "./utils/api/clips.ts"; import EditClip from "./pages/EditClip.tsx"; import EditVod from "./pages/EditVod.tsx"; import Profile from "./pages/Profile.tsx"; @@ -32,8 +32,8 @@ function App() { } /> } /> } /> - } /> - } /> + } /> + } /> } /> } /> } /> diff --git a/frontend/src/pages/MediaPlayer.tsx b/frontend/src/pages/MediaPlayer.tsx index e6770e6..f1dbed6 100644 --- a/frontend/src/pages/MediaPlayer.tsx +++ b/frontend/src/pages/MediaPlayer.tsx @@ -14,13 +14,14 @@ type MediaItem = { type MediaPlayerProps = { /** Human-readable name for the media, e.g. "VoD" or "clip". Used in messages. */ noun: string, - /** Fetches the raw video blob for the given id. */ - fetchBlob: (id: string) => Promise, + /** Builds the raw media stream URL for the given id. Loaded directly by the + *