From 3fa2eb31593f55b76481a3fe509681cf8a529b54 Mon Sep 17 00:00:00 2001 From: zimplexing Date: Mon, 21 Jul 2025 19:03:12 +0800 Subject: [PATCH] feat: add useKeepAwake to LivePlayer and update version to 1.2.7 --- app/play.tsx | 2 +- components/LivePlayer.tsx | 2 ++ package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/play.tsx b/app/play.tsx index 60cc942..9340663 100644 --- a/app/play.tsx +++ b/app/play.tsx @@ -8,7 +8,7 @@ import { PlayerControls } from "@/components/PlayerControls"; import { EpisodeSelectionModal } from "@/components/EpisodeSelectionModal"; import { SourceSelectionModal } from "@/components/SourceSelectionModal"; import { SeekingBar } from "@/components/SeekingBar"; -import { NextEpisodeOverlay } from "@/components/NextEpisodeOverlay"; +// import { NextEpisodeOverlay } from "@/components/NextEpisodeOverlay"; import VideoLoadingAnimation from "@/components/VideoLoadingAnimation"; import useDetailStore from "@/stores/detailStore"; import { useTVRemoteHandler } from "@/hooks/useTVRemoteHandler"; diff --git a/components/LivePlayer.tsx b/components/LivePlayer.tsx index b167cb5..ad49692 100644 --- a/components/LivePlayer.tsx +++ b/components/LivePlayer.tsx @@ -1,6 +1,7 @@ import React, { useRef, useState, useEffect } from "react"; import { View, StyleSheet, Text, ActivityIndicator } from "react-native"; import { Video, ResizeMode, AVPlaybackStatus } from "expo-av"; +import { useKeepAwake } from "expo-keep-awake"; interface LivePlayerProps { streamUrl: string | null; @@ -15,6 +16,7 @@ export default function LivePlayer({ streamUrl, channelTitle, onPlaybackStatusUp const [isLoading, setIsLoading] = useState(false); const [isTimeout, setIsTimeout] = useState(false); const timeoutRef = useRef(null); + useKeepAwake(); useEffect(() => { if (timeoutRef.current) { diff --git a/package.json b/package.json index b7346c7..a73538e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "OrionTV", "private": true, "main": "expo-router/entry", - "version": "1.2.6", + "version": "1.2.7", "scripts": { "start": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start", "start-tv": "EXPO_TV=1 EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start",