diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index 42244641..966191b7 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -28,6 +28,9 @@ import Animated, { } from "react-native-reanimated"; import { useRouter, useSegments } from "expo-router"; import { BlurView } from "expo-blur"; +import { writeToLog } from "@/utils/log"; +import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl"; +import { Image } from "expo-image"; export const currentlyPlayingItemAtom = atom<{ item: BaseItemDto; @@ -173,6 +176,17 @@ export const CurrentlyPlayingBar: React.FC = () => { [item], ); + const backdropUrl = useMemo( + () => + getBackdropUrl({ + api, + item, + quality: 70, + width: 200, + }), + [item], + ); + useEffect(() => { if (cp?.playbackUrl) { play(); @@ -203,31 +217,50 @@ export const CurrentlyPlayingBar: React.FC = () => { onPress={() => { videoRef.current?.presentFullscreenPlayer(); }} - className="aspect-video h-full bg-neutral-800 rounded-md overflow-hidden" + className={`relative h-full bg-neutral-800 rounded-md overflow-hidden + ${item?.Type === "Audio" ? "aspect-square" : "aspect-video"} + `} > {cp.playbackUrl && (