diff --git a/apps/expo/src/app/video-player.tsx b/apps/expo/src/app/video-player.tsx
index 0ddefc2..32fc2d7 100644
--- a/apps/expo/src/app/video-player.tsx
+++ b/apps/expo/src/app/video-player.tsx
@@ -1,6 +1,6 @@
import type { VideoRef } from "react-native-video";
import React, { useEffect, useRef, useState } from "react";
-import { ActivityIndicator, StyleSheet } from "react-native";
+import { ActivityIndicator } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Video from "react-native-video";
import { useLocalSearchParams } from "expo-router";
@@ -16,85 +16,69 @@ export default function VideoPlayerWrapper() {
return ;
}
interface VideoPlayerProps {
- videoUrl: string;
+ videoUrl: string;
}
const VideoPlayer: React.FC = ({ videoUrl }) => {
- const [isLoading, setIsLoading] = useState(true);
- const videoPlayer = useRef(null);
+ const [isLoading, setIsLoading] = useState(true);
+ const videoPlayer = useRef(null);
- useEffect(() => {
- const lockOrientation = async () => {
- await ScreenOrientation.lockAsync(
- ScreenOrientation.OrientationLock.LANDSCAPE
- );
- };
+ useEffect(() => {
+ const lockOrientation = async () => {
+ await ScreenOrientation.lockAsync(
+ ScreenOrientation.OrientationLock.LANDSCAPE,
+ );
+ };
- const unlockOrientation = async () => {
- await ScreenOrientation.lockAsync(
- ScreenOrientation.OrientationLock.PORTRAIT_UP
- );
- };
+ const unlockOrientation = async () => {
+ await ScreenOrientation.lockAsync(
+ ScreenOrientation.OrientationLock.PORTRAIT_UP,
+ );
+ };
- const presentFullscreenPlayer = async () => {
- if (videoPlayer.current) {
- videoPlayer.current.presentFullscreenPlayer();
- await lockOrientation();
- }
- };
+ const presentFullscreenPlayer = async () => {
+ if (videoPlayer.current) {
+ videoPlayer.current.presentFullscreenPlayer();
+ await lockOrientation();
+ }
+ };
- const dismissFullscreenPlayer = async () => {
- if (videoPlayer.current) {
- videoPlayer.current.dismissFullscreenPlayer();
- await unlockOrientation();
- }
- };
+ const dismissFullscreenPlayer = async () => {
+ if (videoPlayer.current) {
+ videoPlayer.current.dismissFullscreenPlayer();
+ await unlockOrientation();
+ }
+ };
- setIsLoading(true);
- void presentFullscreenPlayer();
+ setIsLoading(true);
+ void presentFullscreenPlayer();
- return () => {
- void dismissFullscreenPlayer();
- };
- }, [videoUrl]);
+ return () => {
+ void dismissFullscreenPlayer();
+ };
+ }, [videoUrl]);
- const onVideoLoadStart = () => {
- setIsLoading(true);
- };
+ const onVideoLoadStart = () => {
+ setIsLoading(true);
+ };
- const onReadyForDisplay = () => {
- setIsLoading(false);
- };
+ const onReadyForDisplay = () => {
+ setIsLoading(false);
+ };
- return (
-
-
- {isLoading && }
-
- );
+ return (
+
+
+ {isLoading && }
+
+ );
};
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: "center",
- alignItems: "center",
- backgroundColor: "black",
- },
- fullScreen: {
- position: "absolute",
- top: 0,
- left: 0,
- bottom: 0,
- right: 0,
- },
-});