mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
chore: some adjustments
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
"expo-brightness": "~11.8.0",
|
"expo-brightness": "~11.8.0",
|
||||||
"expo-build-properties": "~0.11.1",
|
"expo-build-properties": "~0.11.1",
|
||||||
"expo-constants": "~15.4.5",
|
"expo-constants": "~15.4.5",
|
||||||
|
"expo-haptics": "~12.8.1",
|
||||||
"expo-linking": "~6.2.2",
|
"expo-linking": "~6.2.2",
|
||||||
"expo-navigation-bar": "^2.8.1",
|
"expo-navigation-bar": "^2.8.1",
|
||||||
"expo-router": "~3.4.6",
|
"expo-router": "~3.4.6",
|
||||||
|
@@ -51,6 +51,7 @@ export const VideoPlayer = () => {
|
|||||||
|
|
||||||
const isIdle = usePlayerStore((state) => state.interface.isIdle);
|
const isIdle = usePlayerStore((state) => state.interface.isIdle);
|
||||||
const stream = usePlayerStore((state) => state.interface.currentStream);
|
const stream = usePlayerStore((state) => state.interface.currentStream);
|
||||||
|
const hlsTracks = usePlayerStore((state) => state.interface.hlsTracks);
|
||||||
const setVideoRef = usePlayerStore((state) => state.setVideoRef);
|
const setVideoRef = usePlayerStore((state) => state.setVideoRef);
|
||||||
const setStatus = usePlayerStore((state) => state.setStatus);
|
const setStatus = usePlayerStore((state) => state.setStatus);
|
||||||
const setIsIdle = usePlayerStore((state) => state.setIsIdle);
|
const setIsIdle = usePlayerStore((state) => state.setIsIdle);
|
||||||
@@ -136,7 +137,7 @@ export const VideoPlayer = () => {
|
|||||||
const initializePlayer = async () => {
|
const initializePlayer = async () => {
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
await dismissFullscreenPlayer();
|
await dismissFullscreenPlayer();
|
||||||
return router.push("/(tabs)");
|
return router.back();
|
||||||
}
|
}
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
@@ -144,6 +145,7 @@ export const VideoPlayer = () => {
|
|||||||
|
|
||||||
if (stream.type === "hls") {
|
if (stream.type === "hls") {
|
||||||
url = stream.playlist;
|
url = stream.playlist;
|
||||||
|
console.log(hlsTracks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.type === "file") {
|
if (stream.type === "file") {
|
||||||
@@ -153,7 +155,7 @@ export const VideoPlayer = () => {
|
|||||||
|
|
||||||
if (!url) {
|
if (!url) {
|
||||||
await dismissFullscreenPlayer();
|
await dismissFullscreenPlayer();
|
||||||
return router.push("/(tabs)");
|
return router.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
setVideoSrc({
|
setVideoSrc({
|
||||||
@@ -179,7 +181,7 @@ export const VideoPlayer = () => {
|
|||||||
return () => {
|
return () => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
};
|
};
|
||||||
}, [dismissFullscreenPlayer, hasStartedPlaying, router, stream]);
|
}, [dismissFullscreenPlayer, hasStartedPlaying, hlsTracks, router, stream]);
|
||||||
|
|
||||||
const onVideoLoadStart = () => {
|
const onVideoLoadStart = () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
@@ -190,8 +192,6 @@ export const VideoPlayer = () => {
|
|||||||
setHasStartedPlaying(true);
|
setHasStartedPlaying(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(videoSrc, isLoading);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GestureDetector gesture={composedGesture}>
|
<GestureDetector gesture={composedGesture}>
|
||||||
<View className="flex-1 items-center justify-center bg-black">
|
<View className="flex-1 items-center justify-center bg-black">
|
||||||
|
11
pnpm-lock.yaml
generated
11
pnpm-lock.yaml
generated
@@ -65,6 +65,9 @@ importers:
|
|||||||
expo-constants:
|
expo-constants:
|
||||||
specifier: ~15.4.5
|
specifier: ~15.4.5
|
||||||
version: 15.4.5(expo@50.0.5)
|
version: 15.4.5(expo@50.0.5)
|
||||||
|
expo-haptics:
|
||||||
|
specifier: ~12.8.1
|
||||||
|
version: 12.8.1(expo@50.0.5)
|
||||||
expo-linking:
|
expo-linking:
|
||||||
specifier: ~6.2.2
|
specifier: ~6.2.2
|
||||||
version: 6.2.2(expo@50.0.5)
|
version: 6.2.2(expo@50.0.5)
|
||||||
@@ -5615,6 +5618,14 @@ packages:
|
|||||||
fontfaceobserver: 2.3.0
|
fontfaceobserver: 2.3.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/expo-haptics@12.8.1(expo@50.0.5):
|
||||||
|
resolution: {integrity: sha512-ntLsHkfle8K8w9MW8pZEw92ZN3sguaGUSSIxv30fPKNeQFu7Cq/h47Qv3tONv2MO3wU48N9FbKnant6XlfptpA==}
|
||||||
|
peerDependencies:
|
||||||
|
expo: '*'
|
||||||
|
dependencies:
|
||||||
|
expo: 50.0.5(@babel/core@7.23.9)(@react-native/babel-preset@0.73.20)
|
||||||
|
dev: false
|
||||||
|
|
||||||
/expo-keep-awake@12.8.2(expo@50.0.5):
|
/expo-keep-awake@12.8.2(expo@50.0.5):
|
||||||
resolution: {integrity: sha512-uiQdGbSX24Pt8nGbnmBtrKq6xL/Tm3+DuDRGBk/3ZE/HlizzNosGRIufIMJ/4B4FRw4dw8KU81h2RLuTjbay6g==}
|
resolution: {integrity: sha512-uiQdGbSX24Pt8nGbnmBtrKq6xL/Tm3+DuDRGBk/3ZE/HlizzNosGRIufIMJ/4B4FRw4dw8KU81h2RLuTjbay6g==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
Reference in New Issue
Block a user