diff --git a/app/(auth)/play-offline-video.tsx b/app/(auth)/play-offline-video.tsx index b4310d31..5caa17b5 100644 --- a/app/(auth)/play-offline-video.tsx +++ b/app/(auth)/play-offline-video.tsx @@ -2,7 +2,6 @@ import { Controls } from "@/components/video-player/Controls"; import { useAndroidNavigationBar } from "@/hooks/useAndroidNavigationBar"; import { useOrientation } from "@/hooks/useOrientation"; import { useOrientationSettings } from "@/hooks/useOrientationSettings"; -import useScreenDimensions from "@/hooks/useScreenDimensions"; import { apiAtom } from "@/providers/JellyfinProvider"; import { PlaybackType, @@ -14,7 +13,7 @@ import * as Haptics from "expo-haptics"; import { useFocusEffect } from "expo-router"; import { useAtomValue } from "jotai"; import React, { useCallback, useMemo, useRef, useState } from "react"; -import { Pressable, StatusBar, View } from "react-native"; +import { Pressable, StatusBar, useWindowDimensions, View } from "react-native"; import { useSharedValue } from "react-native-reanimated"; import Video, { OnProgressData, VideoRef } from "react-native-video"; @@ -26,7 +25,7 @@ export default function page() { const videoSource = useVideoSource(playSettings, api, playUrl); const firstTime = useRef(true); - const screenDimensions = useScreenDimensions(); + const dimensions = useWindowDimensions(); useOrientation(); useOrientationSettings(); useAndroidNavigationBar(); @@ -82,8 +81,8 @@ export default function page() { return ( @@ -232,15 +231,18 @@ export default function page() { position: "absolute", top: 0, left: 0, - width: screenDimensions.width, - height: screenDimensions.height, + width: dimensions.width, + height: dimensions.height, zIndex: 0, }} >