feat: AuthContext, protected routes, admin page, fix VideoPlayer URL
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user