Skip to content

Commit

Permalink
Allow toggling marquee play
Browse files Browse the repository at this point in the history
  • Loading branch information
skanderm committed Sep 26, 2023
1 parent 6483450 commit b77a8e9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions ui/src/components/Player/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function Player({
"id" | "slug" | "nodeName" | "name" | "latLng" | "imageUrl"
>;
}) {
const [playMarquee, setPlayMarquee] = useState(true);
const [playerStatus, setPlayerStatus] = useState<PlayerStatus>("idle");
const playerRef = useRef<VideoJSPlayer | null>(null);

Expand Down Expand Up @@ -200,10 +201,13 @@ export default function Player({
{playerText}
</Typography>
</TitlePopover>
<Box sx={displayMobileOnly}>
<Box
sx={displayMobileOnly}
onClick={() => setPlayMarquee(!playMarquee)}
>
<Marquee
speed={20}
play={playerTextOverflowing && !isDesktop}
play={playerTextOverflowing && !isDesktop && playMarquee}
key={`${playerTextOverflowing}`}
>
<Box ref={playerTextRef}>
Expand Down Expand Up @@ -233,8 +237,14 @@ export default function Player({
`${currentFeed.latLng.lat}, ${currentFeed.latLng.lng}`
}
>
<TitlePopover title={currentFeed && `${currentFeed.latLng.lat}, ${currentFeed.latLng.lng}`}>
{currentFeed && `${currentFeed.latLng.lat}, ${currentFeed.latLng.lng}`}
<TitlePopover
title={
currentFeed &&
`${currentFeed.latLng.lat}, ${currentFeed.latLng.lng}`
}
>
{currentFeed &&
`${currentFeed.latLng.lat}, ${currentFeed.latLng.lng}`}
</TitlePopover>
</Box>
</Box>
Expand Down

0 comments on commit b77a8e9

Please sign in to comment.