Merge branches 'main' and 'main' of https://github.com/john-david3/cs3305-team11
This commit is contained in:
@@ -30,8 +30,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
||||
}
|
||||
|
||||
const setupPlayer = async () => {
|
||||
const streamKey = await fetchStreamKey();
|
||||
const streamUrl = `/stream/${streamKey}/index.m3u8`;
|
||||
const streamUrl = `/stream/${streamerName}/index.m3u8`;
|
||||
|
||||
if (!playerRef.current) {
|
||||
const videoElement = document.createElement("video");
|
||||
@@ -87,12 +86,6 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const fetchStreamKey = async () => {
|
||||
const response = await fetch(`/api/user/${streamerName}/stream_key`);
|
||||
const keyData = await response.json();
|
||||
return keyData.stream_key;
|
||||
};
|
||||
|
||||
setupPlayer();
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -92,7 +92,7 @@ const CategoryPage: React.FC = () => {
|
||||
if (hasMoreData && !streams.length) return <LoadingScreen />;
|
||||
|
||||
return (
|
||||
<DynamicPageContent className="min-h-screen bg-gradient-radial from-[#ff00f1] via-[#0400ff] to-[#ff0000]">
|
||||
<DynamicPageContent className="min-h-screen">
|
||||
<div className="pt-8">
|
||||
<ListRow
|
||||
ref={listRowRef}
|
||||
|
||||
@@ -24,15 +24,14 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
|
||||
navigate(`/category/${categoryName}`);
|
||||
};
|
||||
|
||||
if (isLoadingStreams || isLoadingCategories) {
|
||||
console.log("No content found yet");
|
||||
if (isLoadingStreams || isLoadingCategories)
|
||||
return <LoadingScreen>Loading Content...</LoadingScreen>;
|
||||
}
|
||||
|
||||
return (
|
||||
<DynamicPageContent
|
||||
navbarVariant="home"
|
||||
className="relative min-h-screen animate-moving_bg"
|
||||
contentClassName="pb-[12vh]"
|
||||
>
|
||||
<ListRow
|
||||
type="stream"
|
||||
@@ -76,7 +75,7 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
|
||||
extraClasses="absolute right-10"
|
||||
onClick={() => navigate("/categories")}
|
||||
>
|
||||
Show More
|
||||
Show All
|
||||
</Button>
|
||||
</ListRow>
|
||||
<Footer/>
|
||||
|
||||
Reference in New Issue
Block a user