mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-05 05:28:37 +01:00
chore
This commit is contained in:
@@ -26,6 +26,8 @@ import { BlurView } from "expo-blur";
|
|||||||
import { writeToLog } from "@/utils/log";
|
import { writeToLog } from "@/utils/log";
|
||||||
import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl";
|
import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl";
|
||||||
import { getAuthHeaders } from "@/utils/jellyfin/jellyfin";
|
import { getAuthHeaders } from "@/utils/jellyfin/jellyfin";
|
||||||
|
import { useSettings } from "@/utils/atoms/settings";
|
||||||
|
import * as ScreenOrientation from "expo-screen-orientation";
|
||||||
|
|
||||||
export const currentlyPlayingItemAtom = atom<{
|
export const currentlyPlayingItemAtom = atom<{
|
||||||
item: BaseItemDto;
|
item: BaseItemDto;
|
||||||
@@ -39,10 +41,12 @@ export const CurrentlyPlayingBar: React.FC = () => {
|
|||||||
|
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const segments = useSegments();
|
const segments = useSegments();
|
||||||
|
const [settings, updateSettings] = useSettings();
|
||||||
|
|
||||||
const videoRef = useRef<VideoRef | null>(null);
|
const videoRef = useRef<VideoRef | null>(null);
|
||||||
const [paused, setPaused] = useState(true);
|
const [paused, setPaused] = useState(true);
|
||||||
const [progress, setProgress] = useState(0);
|
const [progress, setProgress] = useState(0);
|
||||||
|
const [fullScreen, setFullScreen] = useState(false);
|
||||||
|
|
||||||
const aBottom = useSharedValue(0);
|
const aBottom = useSharedValue(0);
|
||||||
const aPadding = useSharedValue(0);
|
const aPadding = useSharedValue(0);
|
||||||
@@ -90,6 +94,14 @@ export const CurrentlyPlayingBar: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}, [segments]);
|
}, [segments]);
|
||||||
|
|
||||||
|
// TODO: Fix this
|
||||||
|
// useEffect(() => {
|
||||||
|
// if (settings?.forceLandscapeInVideoPlayer === true && fullScreen)
|
||||||
|
// ScreenOrientation.lockAsync(
|
||||||
|
// ScreenOrientation.OrientationLock.LANDSCAPE_LEFT,
|
||||||
|
// );
|
||||||
|
// }, [settings, fullScreen]);
|
||||||
|
|
||||||
const { data: item } = useQuery({
|
const { data: item } = useQuery({
|
||||||
queryKey: ["item", cp?.item.Id],
|
queryKey: ["item", cp?.item.Id],
|
||||||
queryFn: async () =>
|
queryFn: async () =>
|
||||||
@@ -247,6 +259,12 @@ export const CurrentlyPlayingBar: React.FC = () => {
|
|||||||
onBuffer={(e) =>
|
onBuffer={(e) =>
|
||||||
e.isBuffering ? console.log("Buffering...") : null
|
e.isBuffering ? console.log("Buffering...") : null
|
||||||
}
|
}
|
||||||
|
onFullscreenPlayerDidDismiss={() => {
|
||||||
|
setFullScreen(false);
|
||||||
|
}}
|
||||||
|
onFullscreenPlayerDidPresent={() => {
|
||||||
|
setFullScreen(true);
|
||||||
|
}}
|
||||||
onPlaybackStateChanged={(e) => {
|
onPlaybackStateChanged={(e) => {
|
||||||
if (e.isPlaying) {
|
if (e.isPlaying) {
|
||||||
setPaused(false);
|
setPaused(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user