From 23b20d51055f6058e1a262a044ccec55644321ed Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 1 Sep 2025 21:59:13 +0000 Subject: [PATCH] Improve video navigation by adding touch swipe functionality Add console logs to the VideoPage component to aid in debugging touch swipe gesture recognition and video navigation logic. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 890577b1-c154-40a4-a177-a0c6d55320c3 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/890577b1-c154-40a4-a177-a0c6d55320c3/DyHCx4q --- client/src/pages/VideoPage.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index 36faa02..ecf3211 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -200,6 +200,7 @@ export default function VideoPage() { const handleTouchStart = (e: React.TouchEvent) => { setTouchEnd(0); setTouchStart(e.targetTouches[0].clientX); + console.log('VideoPage touch start - currentVideo:', currentVideo?.title, 'allVideos count:', allVideos.length); }; const handleTouchMove = (e: React.TouchEvent) => { @@ -212,11 +213,15 @@ export default function VideoPage() { const distance = touchStart - touchEnd; const isLeftSwipe = distance > 20; const isRightSwipe = distance < -20; + + console.log('VideoPage swipe:', { distance, isLeftSwipe, isRightSwipe, allVideosCount: allVideos.length }); if (isLeftSwipe) { + console.log('Navigating to next video'); navigateToVideo('next'); } if (isRightSwipe) { + console.log('Navigating to prev video'); navigateToVideo('prev'); } };