diff --git a/components/VideoPlayer.tsx b/components/VideoPlayer.tsx index 1f2bdb3..3808e25 100644 --- a/components/VideoPlayer.tsx +++ b/components/VideoPlayer.tsx @@ -20,8 +20,10 @@ interface Props { export function VideoPlayer({ playData, qualities, currentQn, onQualityChange, onMiniPlayer, bvid, cid, danmakus, onTimeUpdate }: Props) { const [fullscreen, setFullscreen] = useState(false); - const { width } = useWindowDimensions(); + const { width, height } = useWindowDimensions(); const VIDEO_HEIGHT = width * 0.5625; + // When ScreenOrientation is unavailable (Expo Go), simulate landscape via transform + const needsRotation = !ScreenOrientation && fullscreen; const lastTimeRef = useRef(0); const handleEnterFullscreen = async () => { @@ -85,21 +87,26 @@ export function VideoPlayer({ playData, qualities, currentQn, onQualityChange, o