feat: add 3s scroll-pause video auto-play to homepage Signature Menu + update Menu page to 3s

- Duplicated mobile scroll-pause logic (3s timeout) to homepage Signature Menu (using .signature-card + .relative.h-48 structure, with video support added to signatureDishes).
- Updated both /menu and homepage Signature Menu from 2s to 3s pause before playing video on scroll stop.
- Added onMouse handlers for desktop hover consistency on signature cards.
- Maintains posters while scrolling, plays video after 3s pause on item.
- Desktop hover behavior preserved.
- Builds cleanly.
This commit is contained in:
Zeeshan Khan
2026-06-02 15:46:00 +02:00
parent ffaef59049
commit bca3d83bb4
2 changed files with 201 additions and 22 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ export default function MenuPage() {
window.scrollTo({ top: 220, behavior: "smooth" });
};
// Mobile video auto-play on scroll pause (2s)
// Mobile video auto-play on scroll pause (3s)
useEffect(() => {
const updateMobile = () => setIsMobile(window.innerWidth < 768);
updateMobile();
@@ -149,7 +149,7 @@ export default function MenuPage() {
if (focusedId) {
playMobileVideo(focusedId);
}
}, 2000);
}, 3000);
};
window.addEventListener("scroll", onScrollOrTouch, { passive: true });
window.addEventListener("touchmove", onScrollOrTouch, { passive: true });