From 79334f2c1b6cd56f5368f6864851308bf3a3a58d Mon Sep 17 00:00:00 2001 From: Skander Mzali Date: Tue, 26 Sep 2023 14:39:35 -0500 Subject: [PATCH] Slow down speed, autoplay after 3 seconds --- ui/src/components/Player/Player.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/src/components/Player/Player.tsx b/ui/src/components/Player/Player.tsx index 52bbbb43..97d66bbe 100644 --- a/ui/src/components/Player/Player.tsx +++ b/ui/src/components/Player/Player.tsx @@ -35,7 +35,6 @@ export default function Player({ "id" | "slug" | "nodeName" | "name" | "latLng" | "imageUrl" >; }) { - const [playMarquee, setPlayMarquee] = useState(false); const [playerStatus, setPlayerStatus] = useState("idle"); const playerRef = useRef(null); @@ -56,6 +55,13 @@ export default function Player({ ); const theme = useTheme(); const isDesktop = useMediaQuery(theme.breakpoints.up("sm")); + const [playMarquee, setPlayMarquee] = useState(false); + + useEffect(() => { + setTimeout(() => { + setPlayMarquee(true); + }, 3000); + }, []) const playerOptions = useMemo( () => ({ @@ -209,7 +215,7 @@ export default function Player({ }} >