From 2f1a8c4e0c4aa4482d9b557e9cd70cbeecd320d0 Mon Sep 17 00:00:00 2001 From: Khoa Vo Date: Sat, 20 Dec 2025 15:01:02 +0700 Subject: [PATCH] fix: resolve merge conflicts in VideoPlayer.tsx --- frontend/src/components/VideoPlayer.tsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/VideoPlayer.tsx b/frontend/src/components/VideoPlayer.tsx index f3329bf..0f16c48 100644 --- a/frontend/src/components/VideoPlayer.tsx +++ b/frontend/src/components/VideoPlayer.tsx @@ -49,13 +49,9 @@ export const VideoPlayer: React.FC = ({ const [localMuted, setLocalMuted] = useState(true); const isMuted = externalMuted !== undefined ? externalMuted : localMuted; const [hearts, setHearts] = useState([]); -<<<<<<< HEAD - const [isLoading, setIsLoading] = useState(true); - const [cachedUrl, setCachedUrl] = useState(null); -======= const [isLoading, setIsLoading] = useState(true); // Show loading spinner until video is ready + const [cachedUrl, setCachedUrl] = useState(null); const [codecError, setCodecError] = useState(false); // True if video codec not supported ->>>>>>> 6153739 (feat: client-side video optimization - remove server transcoding for instant loading and zero CPU) const lastTapRef = useRef(0); const browserSupportsHEVC = useRef(supportsHEVC()); @@ -119,8 +115,8 @@ export const VideoPlayer: React.FC = ({ // Reset fallback and loading state when video changes useEffect(() => { setUseFallback(false); -<<<<<<< HEAD - setIsLoading(true); + setIsLoading(true); // Show loading for new video + setCodecError(false); // Reset codec error for new video setCachedUrl(null); const checkCache = async () => { @@ -132,10 +128,6 @@ export const VideoPlayer: React.FC = ({ }; checkCache(); -======= - setIsLoading(true); // Show loading for new video - setCodecError(false); // Reset codec error for new video ->>>>>>> 6153739 (feat: client-side video optimization - remove server transcoding for instant loading and zero CPU) }, [video.id]); // Progress tracking