fix: resolve merge conflicts in VideoPlayer.tsx

This commit is contained in:
Khoa Vo 2025-12-20 15:01:02 +07:00
parent aad352a80f
commit 2f1a8c4e0c

View file

@ -49,13 +49,9 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
const [localMuted, setLocalMuted] = useState(true); const [localMuted, setLocalMuted] = useState(true);
const isMuted = externalMuted !== undefined ? externalMuted : localMuted; const isMuted = externalMuted !== undefined ? externalMuted : localMuted;
const [hearts, setHearts] = useState<HeartParticle[]>([]); const [hearts, setHearts] = useState<HeartParticle[]>([]);
<<<<<<< HEAD
const [isLoading, setIsLoading] = useState(true);
const [cachedUrl, setCachedUrl] = useState<string | null>(null);
=======
const [isLoading, setIsLoading] = useState(true); // Show loading spinner until video is ready const [isLoading, setIsLoading] = useState(true); // Show loading spinner until video is ready
const [cachedUrl, setCachedUrl] = useState<string | null>(null);
const [codecError, setCodecError] = useState(false); // True if video codec not supported 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<number>(0); const lastTapRef = useRef<number>(0);
const browserSupportsHEVC = useRef(supportsHEVC()); const browserSupportsHEVC = useRef(supportsHEVC());
@ -119,8 +115,8 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
// Reset fallback and loading state when video changes // Reset fallback and loading state when video changes
useEffect(() => { useEffect(() => {
setUseFallback(false); setUseFallback(false);
<<<<<<< HEAD setIsLoading(true); // Show loading for new video
setIsLoading(true); setCodecError(false); // Reset codec error for new video
setCachedUrl(null); setCachedUrl(null);
const checkCache = async () => { const checkCache = async () => {
@ -132,10 +128,6 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
}; };
checkCache(); 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]); }, [video.id]);
// Progress tracking // Progress tracking