mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-05-22 10:07:34 +08:00
Add toast notifications for intro and outro time settings, update player store and media button for new time tracking
This commit is contained in:
@@ -4,6 +4,7 @@ import { Stack } from "expo-router";
|
||||
import * as SplashScreen from "expo-splash-screen";
|
||||
import { useEffect } from "react";
|
||||
import { Platform } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
|
||||
import { useSettingsStore } from "@/stores/settingsStore";
|
||||
|
||||
@@ -43,6 +44,7 @@ export default function RootLayout() {
|
||||
<Stack.Screen name="search" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="+not-found" />
|
||||
</Stack>
|
||||
<Toast />
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ export default function PlayScreen() {
|
||||
showSourceModal,
|
||||
showNextEpisodeOverlay,
|
||||
initialPosition,
|
||||
introEndTime,
|
||||
setVideoRef,
|
||||
loadVideo,
|
||||
playEpisode,
|
||||
@@ -102,8 +103,9 @@ export default function PlayScreen() {
|
||||
resizeMode={ResizeMode.CONTAIN}
|
||||
onPlaybackStatusUpdate={handlePlaybackStatusUpdate}
|
||||
onLoad={() => {
|
||||
if (initialPosition > 0) {
|
||||
videoRef.current?.setPositionAsync(initialPosition);
|
||||
const jumpPosition = introEndTime || initialPosition;
|
||||
if (jumpPosition > 0) {
|
||||
videoRef.current?.setPositionAsync(jumpPosition);
|
||||
}
|
||||
usePlayerStore.setState({ isLoading: false });
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user