mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:43:25 +00:00
chore: some adjustments
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
"expo-brightness": "~11.8.0",
|
||||
"expo-build-properties": "~0.11.1",
|
||||
"expo-constants": "~15.4.5",
|
||||
"expo-haptics": "~12.8.1",
|
||||
"expo-linking": "~6.2.2",
|
||||
"expo-navigation-bar": "^2.8.1",
|
||||
"expo-router": "~3.4.6",
|
||||
|
@@ -51,6 +51,7 @@ export const VideoPlayer = () => {
|
||||
|
||||
const isIdle = usePlayerStore((state) => state.interface.isIdle);
|
||||
const stream = usePlayerStore((state) => state.interface.currentStream);
|
||||
const hlsTracks = usePlayerStore((state) => state.interface.hlsTracks);
|
||||
const setVideoRef = usePlayerStore((state) => state.setVideoRef);
|
||||
const setStatus = usePlayerStore((state) => state.setStatus);
|
||||
const setIsIdle = usePlayerStore((state) => state.setIsIdle);
|
||||
@@ -136,7 +137,7 @@ export const VideoPlayer = () => {
|
||||
const initializePlayer = async () => {
|
||||
if (!stream) {
|
||||
await dismissFullscreenPlayer();
|
||||
return router.push("/(tabs)");
|
||||
return router.back();
|
||||
}
|
||||
setIsLoading(true);
|
||||
|
||||
@@ -144,6 +145,7 @@ export const VideoPlayer = () => {
|
||||
|
||||
if (stream.type === "hls") {
|
||||
url = stream.playlist;
|
||||
console.log(hlsTracks);
|
||||
}
|
||||
|
||||
if (stream.type === "file") {
|
||||
@@ -153,7 +155,7 @@ export const VideoPlayer = () => {
|
||||
|
||||
if (!url) {
|
||||
await dismissFullscreenPlayer();
|
||||
return router.push("/(tabs)");
|
||||
return router.back();
|
||||
}
|
||||
|
||||
setVideoSrc({
|
||||
@@ -179,7 +181,7 @@ export const VideoPlayer = () => {
|
||||
return () => {
|
||||
clearTimeout(timeout);
|
||||
};
|
||||
}, [dismissFullscreenPlayer, hasStartedPlaying, router, stream]);
|
||||
}, [dismissFullscreenPlayer, hasStartedPlaying, hlsTracks, router, stream]);
|
||||
|
||||
const onVideoLoadStart = () => {
|
||||
setIsLoading(true);
|
||||
@@ -190,8 +192,6 @@ export const VideoPlayer = () => {
|
||||
setHasStartedPlaying(true);
|
||||
};
|
||||
|
||||
console.log(videoSrc, isLoading);
|
||||
|
||||
return (
|
||||
<GestureDetector gesture={composedGesture}>
|
||||
<View className="flex-1 items-center justify-center bg-black">
|
||||
|
Reference in New Issue
Block a user