From 2632feb3e880c5d2691f1940146f2cfc9d991695 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 13 Sep 2024 12:24:25 +0300 Subject: [PATCH] wip --- components/CurrentlyPlayingBar.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index 8bdd1e41..3bc7f01c 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -84,6 +84,16 @@ export const CurrentlyPlayingBar: React.FC = () => { }; }); + const startPosition = useMemo( + () => + currentlyPlaying?.item?.UserData?.PlaybackPositionTicks + ? Math.round( + currentlyPlaying?.item.UserData.PlaybackPositionTicks / 10000 + ) + : 0, + [currentlyPlaying?.item] + ); + const videoSource = useMemo(() => { if (!api || !currentlyPlaying || !poster) return null; return {