diff --git a/src/components/FullscreenIntroVideo.web.js b/src/components/FullscreenIntroVideo.web.js index ba7417c..817ccd7 100644 --- a/src/components/FullscreenIntroVideo.web.js +++ b/src/components/FullscreenIntroVideo.web.js @@ -1,8 +1,7 @@ -import React, { useEffect, useMemo, useRef, useState } from "react"; -import { Pressable, Text, View } from "react-native"; +import { Portal } from "@gorhom/portal"; import { Asset } from "expo-asset"; - -import { videos } from "../assets"; +import React, { useEffect, useRef, useState } from "react"; +import { Pressable, Text, View } from "react-native"; const overlayStyle = { position: "fixed", @@ -58,8 +57,6 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => { const [uri, setUri] = useState(null); const [muted, setMuted] = useState(false); - const resolvedSource = useMemo(() => url ?? videos.test, [url]); - useEffect(() => { let isMounted = true; @@ -70,8 +67,8 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => { } }; - if (typeof resolvedSource === "string") { - assignUri(resolvedSource); + if (typeof url === "string") { + assignUri(url); return () => { isMounted = false; }; @@ -79,7 +76,7 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => { const load = async () => { try { - const nextUri = await resolveModuleUri(resolvedSource); + const nextUri = await resolveModuleUri(url); assignUri(nextUri); } catch { if (isMounted) { @@ -93,7 +90,7 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => { return () => { isMounted = false; }; - }, [resolvedSource]); + }, [url]); useEffect(() => { if (!visible) { @@ -148,24 +145,27 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => { return null; } + console.log("video uri", uri); return ( - - {uri ? ( - + + + {uri ? ( + + ); }; diff --git a/src/screens/Writing/WritingLyrics.js b/src/screens/Writing/WritingLyrics.js index 3952322..dfa563b 100644 --- a/src/screens/Writing/WritingLyrics.js +++ b/src/screens/Writing/WritingLyrics.js @@ -65,6 +65,7 @@ const WritingLyrics = () => { setShowIntro(false)} />