From 5456496e27599ea506754682e2f7cbc07f49b857 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 30 Aug 2025 22:52:54 +0000 Subject: [PATCH] Update video player to allow seamless transitions between videos Replace direct window location changes with programmatic navigation for smoother video playback transitions. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 344ec1e0-1186-4058-bbff-2e9619a7b1e0 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/344ec1e0-1186-4058-bbff-2e9619a7b1e0/FgaI1Sc --- client/src/pages/VideoPage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index 31bd32c..b7812e8 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react"; import { useQuery } from "@tanstack/react-query"; -import { useRoute } from "wouter"; +import { useRoute, useLocation } from "wouter"; import { type Video } from "@shared/schema"; import go4LogoPath from "@assets/go4_1756394900352.png"; @@ -52,6 +52,7 @@ interface VideosResponse { export default function VideoPage() { const [, params] = useRoute("/video/:id"); + const [, setLocation] = useLocation(); const videoId = params?.id; const [showShareMenu, setShowShareMenu] = useState(false); const [touchStart, setTouchStart] = useState(0); @@ -96,7 +97,7 @@ export default function VideoPage() { const newVideo = allVideos[newIndex]; if (newVideo) { - window.location.href = `/video/${newVideo.id}`; + setLocation(`/video/${newVideo.id}`); } };