From a7480fb47ad4a31983cc4df5da1b561ad935f767 Mon Sep 17 00:00:00 2001 From: kuekhaoyang Date: Tue, 18 Nov 2025 12:40:50 +0800 Subject: [PATCH] feat: add MobileVideoPlayer component with advanced controls and hooks - Implemented MobileVideoPlayer component for mobile video playback. - Added features such as play/pause, skip forward/backward, volume control, and fullscreen support. - Integrated double-tap gesture handling for skipping video. - Included hooks for screen orientation management and mobile detection. - Enhanced user experience with loading indicators and playback speed options. --- app/globals.css | 12 + app/player/page.tsx | 16 +- components/player/CustomVideoPlayer.tsx | 801 +---------------------- components/player/DesktopVideoPlayer.tsx | 801 +++++++++++++++++++++++ components/player/EpisodeList.tsx | 12 +- components/player/MobileVideoPlayer.tsx | 477 ++++++++++++++ components/player/VideoMetadata.tsx | 12 +- components/search/SearchForm.tsx | 9 +- components/search/TypeBadges.tsx | 132 +++- components/search/VideoGrid.tsx | 41 +- components/ui/Badge.tsx | 4 +- components/ui/Button.tsx | 2 +- components/ui/Card.tsx | 4 +- components/ui/Icon.tsx | 16 + components/ui/Input.tsx | 4 +- lib/hooks/useMobilePlayer.ts | 135 ++++ 16 files changed, 1622 insertions(+), 856 deletions(-) create mode 100644 components/player/DesktopVideoPlayer.tsx create mode 100644 components/player/MobileVideoPlayer.tsx create mode 100644 lib/hooks/useMobilePlayer.ts diff --git a/app/globals.css b/app/globals.css index 741a1a5..db0f8c7 100644 --- a/app/globals.css +++ b/app/globals.css @@ -447,4 +447,16 @@ body.dark, cursor: grabbing; } +/* Hide scrollbar utility */ +.scrollbar-hide { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +.scrollbar-hide::-webkit-scrollbar { + display: none; /* Chrome, Safari and Opera */ +} + + + diff --git a/app/player/page.tsx b/app/player/page.tsx index 063944a..907af131 100644 --- a/app/player/page.tsx +++ b/app/player/page.tsx @@ -80,13 +80,13 @@ function PlayerContent() { return (
{/* Glass Navbar */} -