diff --git a/bun.lockb b/bun.lockb index 32f4452c..b8333b9f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index 25964c16..5752a32c 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -105,6 +105,29 @@ export const CurrentlyPlayingBar: React.FC = () => { [currentlyPlaying?.item, api] ); + const videoSource = useMemo(() => { + if (!api || !currentlyPlaying || !backdropUrl) return null; + return { + uri: currentlyPlaying.url, + isNetwork: true, + startPosition, + headers: getAuthHeaders(api), + metadata: { + artist: currentlyPlaying.item?.AlbumArtist + ? currentlyPlaying.item?.AlbumArtist + : undefined, + title: currentlyPlaying.item?.Name || "Unknown", + description: currentlyPlaying.item?.Overview + ? currentlyPlaying.item?.Overview + : undefined, + imageUri: backdropUrl, + subtitle: currentlyPlaying.item?.Album + ? currentlyPlaying.item?.Album + : undefined, + }, + }; + }, [currentlyPlaying, startPosition, api, backdropUrl]); + if (!api || !currentlyPlaying) return null; return ( @@ -139,7 +162,7 @@ export const CurrentlyPlayingBar: React.FC = () => { } `} > - {currentlyPlaying?.url && ( + {videoSource && (