diff --git a/src/About/About.js b/src/About/About.js index 6c9039bb..ffa7b36d 100644 --- a/src/About/About.js +++ b/src/About/About.js @@ -9,46 +9,10 @@ const About = () => { const [videoPlaying, setVideoPlaying] = useState(false); const [currentImageIndex, setCurrentImageIndex] = useState(0); - const toggleMute = () => { - setIsMuted(!isMuted); - if (audioRef.current) { - audioRef.current.volume = isMuted ? 0.5 : 0; // Set volume to 1 if currently muted, 0 if currently unmuted - if (isMuted) { - audioRef.current.play().catch((err) => { - console.error("Error playing audio:", err); - }); - } else { - audioRef.current.pause(); - } - } - }; + + - useEffect(() => { - toggleMute(); - const handleLocationChange = () => { - setIsMuted(true); - if (audioRef.current) { - audioRef.current.pause(); - } - }; - }, []); - - useEffect(() => { - const videoElement = document.querySelector("video"); - if (videoElement) { - videoElement.onplay = () => { - setVideoPlaying(true); - }; - videoElement.onerror = () => { - setVideoPlaying(false); - }; - } - if (audioRef.current) { - audioRef.current.play().catch((err) => { - console.error("Error playing audio:", err); - }); - } - }, []); + return (
@@ -265,45 +229,9 @@ const About = () => {
- + -