feat: AuthContext, protected routes, admin page, fix VideoPlayer URL

This commit is contained in:
2026-03-14 14:31:08 +01:00
parent 324efcaa3d
commit aa15dc0f54
8 changed files with 538 additions and 18 deletions

View File

@@ -20,10 +20,11 @@ export default function VideoPlayer({ storageType, storageKey }: VideoPlayerProp
return <YouTubePlayer videoId={storageKey} />;
}
const apiBase = import.meta.env.VITE_API_URL || '/api';
const url =
storageType === 'external'
? storageKey
: `${import.meta.env.VITE_API_URL}/stream/${storageKey}`;
: `${apiBase}/stream/${storageKey}`;
return <NativePlayer url={url} />;
}